Commit 599deed9 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Fix counting of environment strings.

parent 462d8ae4
......@@ -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++)
......
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