diff options
author | David 'Digit' Turner <digit@google.com> | 2011-09-13 12:06:38 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2011-09-13 12:06:38 +0200 |
commit | dca64d13258f05ec3385403a99eff7da4773ce24 (patch) | |
tree | 73fc5e26835ee40eaa46e5eee9000aca9223353e /android/main-emulator.c | |
parent | e07ec9adfc33c0cfb2056180960d7e62fc5ea7c7 (diff) | |
download | external_qemu-dca64d13258f05ec3385403a99eff7da4773ce24.zip external_qemu-dca64d13258f05ec3385403a99eff7da4773ce24.tar.gz external_qemu-dca64d13258f05ec3385403a99eff7da4773ce24.tar.bz2 |
emulator: fix Win32 runtime crash
Change-Id: I5ca4b1393211c1d8a5caba332c3f6164afb4661b
Diffstat (limited to 'android/main-emulator.c')
-rw-r--r-- | android/main-emulator.c | 4 |
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') { |