From: 纯真的电灯泡1011726441@qq.com
--- dlls/userenv/userenv_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/userenv/userenv_main.c b/dlls/userenv/userenv_main.c index 3e71a88771f..22251c55740 100644 --- a/dlls/userenv/userenv_main.c +++ b/dlls/userenv/userenv_main.c @@ -595,7 +595,7 @@ BOOL WINAPI GetAllUsersProfileDirectoryW(LPWSTR lpProfileDir, LPDWORD lpcchSize) DWORD len = 0, expanded_len; LPWSTR unexpanded_profiles_dir = NULL;
- TRACE("%p %p\n", lpProfilesDir, lpcchSize); + TRACE("%p %p\n", lpProfileDir, lpcchSize);
if (!lpcchSize) { @@ -632,7 +632,7 @@ BOOL WINAPI GetAllUsersProfileDirectoryW(LPWSTR lpProfileDir, LPDWORD lpcchSize) } expanded_len = ExpandEnvironmentStringsW(unexpanded_profiles_dir, NULL, 0); /* The returned length doesn't include the NULL terminator. */ - if (*lpcchSize < expanded_len - 1 || !lpProfilesDir) + if (*lpcchSize < expanded_len - 1 || !lpProfileDir) { *lpcchSize = expanded_len - 1; SetLastError(ERROR_INSUFFICIENT_BUFFER); @@ -640,7 +640,7 @@ BOOL WINAPI GetAllUsersProfileDirectoryW(LPWSTR lpProfileDir, LPDWORD lpcchSize) } *lpcchSize = expanded_len - 1; /* The return value is also the expected length. */ - ret = ExpandEnvironmentStringsW(unexpanded_profiles_dir, lpProfilesDir, + ret = ExpandEnvironmentStringsW(unexpanded_profiles_dir, lpProfileDir, expanded_len) - 1; end: