From 4a046d10f78b51caf9f77dd42160ecc97430012b Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 3 Nov 2017 11:45:01 +0100 Subject: [PATCH] Fixed previous commit --- src/core/platform-helpers/android-platform-helpers.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/platform-helpers/android-platform-helpers.cpp b/src/core/platform-helpers/android-platform-helpers.cpp index 194e72275..9123fb1ef 100644 --- a/src/core/platform-helpers/android-platform-helpers.cpp +++ b/src/core/platform-helpers/android-platform-helpers.cpp @@ -181,18 +181,18 @@ string AndroidPlatformHelpers::getDataPath () { JNIEnv *env = ms_get_jni_env(); jstring jdata_path = (jstring)env->CallObjectMethod(mJavaHelper, mGetDataPathId); const char *data_path = GetStringUTFChars(env, jdata_path); - string dataPath = data_path + "/"; + string dataPath = data_path; ReleaseStringUTFChars(env, jdata_path, data_path); - return dataPath; + return dataPath + "/"; } string AndroidPlatformHelpers::getConfigPath () { JNIEnv *env = ms_get_jni_env(); jstring jconfig_path = (jstring)env->CallObjectMethod(mJavaHelper, mGetConfigPathId); const char *config_path = GetStringUTFChars(env, jconfig_path); - string configPath = config_path + "/"; + string configPath = config_path; ReleaseStringUTFChars(env, jconfig_path, config_path); - return configPath; + return configPath + "/"; } int AndroidPlatformHelpers::callVoidMethod (jmethodID id) {