Fix a crash when launching Unix executables.
This commit is contained in:
parent
ca46969b13
commit
667ac7ff5e
|
@ -1279,7 +1279,8 @@ static char **build_envp( const WCHAR *envW, char *extra_env )
|
|||
char **envptr = envp;
|
||||
|
||||
/* first the extra strings */
|
||||
for (p = extra_env; *p; p += strlen(p) + 1) *envptr++ = alloc_env_string( "", p );
|
||||
if (extra_env)
|
||||
for (p = extra_env; *p; p += strlen(p) + 1) *envptr++ = alloc_env_string( "", p );
|
||||
/* then put PATH, TEMP, TMP, HOME and WINEPREFIX from the unix env */
|
||||
if ((p = getenv("PATH"))) *envptr++ = alloc_env_string( "PATH=", p );
|
||||
if ((p = getenv("TEMP"))) *envptr++ = alloc_env_string( "TEMP=", p );
|
||||
|
|
Loading…
Reference in New Issue