ntdll: Fix counting of environment strings.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48141 Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
462d8ae419
commit
599deed91c
|
@ -526,7 +526,7 @@ char **build_envp( const WCHAR *envW )
|
|||
if (!(env = RtlAllocateHeap( GetProcessHeap(), 0, length ))) return NULL;
|
||||
ntdll_wcstoumbs( 0, envW, lenW, env, length, NULL, NULL );
|
||||
|
||||
for (p = env; *p; p += strlen(p) + 1)
|
||||
for (p = env; *p; p += strlen(p) + 1, count++)
|
||||
if (is_special_env_var( p )) length += 4; /* prefix it with "WINE" */
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE( unix_vars ); i++)
|
||||
|
|
Loading…
Reference in New Issue