Commit 4a8e1fee authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

kernel32: Fix an off-by-one error in build_envp().

We need to take into account the trailing NULL in envp.
parent 5b60258f
......@@ -1185,7 +1185,7 @@ static char **build_envp( const WCHAR *envW )
const WCHAR *end;
char **envp;
char *env, *p;
int count = 0, length;
int count = 1, length;
unsigned int i;
for (end = envW; *end; count++) end += strlenW(end) + 1;
......
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