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:
Francois Gouget 2009-02-17 18:56:22 +01:00 committed by Alexandre Julliard
parent 5b60258f0d
commit 4a8e1feeb4

View File

@ -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;