Commit 988884a4 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

msvcrt: Fix getmainargs() family to return correct environment block.

parent bba9e5ae
......@@ -559,7 +559,7 @@ int CDECL __wgetmainargs(int *argc, wchar_t** *wargv, wchar_t** *wenvp,
MSVCRT__wenviron = msvcrt_SnapshotOfEnvironmentW(NULL);
*argc = MSVCRT___argc;
*wargv = MSVCRT___wargv;
*wenvp = MSVCRT___winitenv;
*wenvp = MSVCRT__wenviron;
if (new_mode)
_set_new_mode( *new_mode );
return 0;
......@@ -593,7 +593,7 @@ int CDECL __getmainargs(int *argc, char** *argv, char** *envp,
*argc = MSVCRT___argc;
*argv = MSVCRT___argv;
*envp = MSVCRT___initenv;
*envp = MSVCRT__environ;
if (new_mode)
_set_new_mode( *new_mode );
......
......@@ -152,7 +152,6 @@ static void test__environ(void)
ok( envp != NULL,
"Expected initial environment block pointer to be non-NULL\n" );
todo_wine
ok( envp == *p_environ,
"Expected initial environment to be equal to _environ\n" );
......@@ -224,7 +223,6 @@ static void test__wenviron(void)
__wgetmainargs(&argc, &wargv, &wenvp, 0, &mode);
ok( wenvp != NULL, "Expected initial environment block pointer to be non-NULL\n" );
todo_wine
ok( wenvp == *p_wenviron, "Expected initial environment to be _wenviron[]\n" );
if (p__p___winitenv)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment