kernel32: Fix an off-by-one error in build_envp().
We need to take into account the trailing NULL in envp.
This commit is contained in:
parent
5b60258f0d
commit
4a8e1feeb4
|
@ -1185,7 +1185,7 @@ static char **build_envp( const WCHAR *envW )
|
||||||
const WCHAR *end;
|
const WCHAR *end;
|
||||||
char **envp;
|
char **envp;
|
||||||
char *env, *p;
|
char *env, *p;
|
||||||
int count = 0, length;
|
int count = 1, length;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (end = envW; *end; count++) end += strlenW(end) + 1;
|
for (end = envW; *end; count++) end += strlenW(end) + 1;
|
||||||
|
|
Loading…
Reference in New Issue