Set WINEDEBUG to an empty value instead of removing it so that it gets

properly cleared in the debugger.
This commit is contained in:
Alexandre Julliard 2005-10-04 18:14:22 +00:00
parent ce1196a84b
commit 2bbf1b5baf
1 changed files with 4 additions and 4 deletions

View File

@ -331,16 +331,16 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent)
} }
} }
/* remove WINEDEBUG from the environment */ /* make WINEDEBUG empty in the environment */
env = GetEnvironmentStringsA(); env = GetEnvironmentStringsA();
for (p = env; *p; p += strlen(p) + 1) for (p = env; *p; p += strlen(p) + 1)
{ {
if (!memcmp( p, "WINEDEBUG=", sizeof("WINEDEBUG=")-1 )) if (!memcmp( p, "WINEDEBUG=", sizeof("WINEDEBUG=")-1 ))
{ {
char *next = p + strlen(p) + 1; char *next = p + strlen(p);
char *end = next; char *end = next + 1;
while (*end) end += strlen(end) + 1; while (*end) end += strlen(end) + 1;
memmove( p, next, end + 1 - next ); memmove( p + sizeof("WINEDEBUG=") - 1, next, end + 1 - next );
break; break;
} }
} }