Only convert '/'s to '\\'s up to the '\0' as the rest of the buffer

may not be initialized (found by Valgrind).
This commit is contained in:
Francois Gouget 2003-11-28 23:36:06 +00:00 committed by Alexandre Julliard
parent e998d0e3cb
commit 82bff6bddd
1 changed files with 1 additions and 1 deletions

View File

@ -478,7 +478,7 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size)
strcatW(buffer, name);
/* convert every / into a \ */
for (ptr = buffer; ptr < buffer + size / sizeof(WCHAR); ptr++)
for (ptr = buffer; *ptr; ptr++)
if (*ptr == '/') *ptr = '\\';
reqsize -= sizeof(WCHAR); /* don't count trailing \0 */