From 12e1714d54f26f513556f0913c5865cc079ffd56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 31 May 2005 01:59:01 +0000 Subject: [PATCH] Fixed stupid bug in copy_environ_to_heap_if_needed(): it copied the environment, but it didn't set the "environ" to the new array, and thus throwing away the copy again. GCC no longer crashes because of this, and runs through without help :) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12914 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/stdlib/env.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/system/libroot/posix/stdlib/env.c b/src/system/libroot/posix/stdlib/env.c index e322b12122..4a7d6a7a68 100644 --- a/src/system/libroot/posix/stdlib/env.c +++ b/src/system/libroot/posix/stdlib/env.c @@ -93,6 +93,7 @@ copy_environ_to_heap_if_needed(void) newEnv[i] = NULL; // null terminate the array + environ = newEnv; sCopied = true; return B_OK; }