aboutsummaryrefslogtreecommitdiffstats
path: root/android/main-emulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'android/main-emulator.c')
-rw-r--r--android/main-emulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/android/main-emulator.c b/android/main-emulator.c
index 3252053..a6e95c7 100644
--- a/android/main-emulator.c
+++ b/android/main-emulator.c
@@ -307,12 +307,12 @@ prependSharedLibraryPath(const char* prefix)
if (path == NULL || path[0] == '\0') {
p = bufprint(temp, end, "PATH=%s", prefix);
} else {
- p = bufprint(temp, end, "PATH=%s;%s", prefix);
+ p = bufprint(temp, end, "PATH=%s;%s", path, prefix);
}
/* Ignore overflow, this will push some paths out of the variable, but
* so be it. */
D("Setting %s\n", temp);
- putenv(temp);
+ putenv(strdup(temp));
#else
const char* path = getenv("LD_LIBRARY_PATH");
if (path != NULL && path[0] != '\0') {