From dca64d13258f05ec3385403a99eff7da4773ce24 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Tue, 13 Sep 2011 12:06:38 +0200 Subject: emulator: fix Win32 runtime crash Change-Id: I5ca4b1393211c1d8a5caba332c3f6164afb4661b --- android/main-emulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'android/main-emulator.c') 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') { -- cgit v1.1