From: Fabian Maurer dark.shadow4@web.de
This is now handled by ExpandEnvironmentStringsA, as should be --- dlls/userenv/tests/userenv.c | 2 -- dlls/userenv/userenv_main.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/userenv/tests/userenv.c b/dlls/userenv/tests/userenv.c index 7f69a329c36..d62d5330efa 100644 --- a/dlls/userenv/tests/userenv.c +++ b/dlls/userenv/tests/userenv.c @@ -294,11 +294,9 @@ static void test_get_profiles_dir(void) /* Rather than a BOOL, the return value is also the number of characters * stored in the buffer. */ - todo_wine ok(profiles_len - 1 == r, "expected %ld, got %d\n", profiles_len - 1, r); ok(!strcmp(buf, profiles_dir), "expected %s, got %s\n", profiles_dir, buf); ok(strlen(buf) + 1 == cch, "String length is %Iu, but cch is %lu\n", strlen(buf), cch); - todo_wine ok(strlen(buf) + 1 == r, "String length is %Iu, but returned count is %u\n", strlen(buf), r);
HeapFree(GetProcessHeap(), 0, buf); diff --git a/dlls/userenv/userenv_main.c b/dlls/userenv/userenv_main.c index dd04c40446e..de79156df3c 100644 --- a/dlls/userenv/userenv_main.c +++ b/dlls/userenv/userenv_main.c @@ -512,8 +512,7 @@ BOOL WINAPI GetProfilesDirectoryA( LPSTR lpProfilesDir, LPDWORD lpcchSize ) } *lpcchSize = expanded_len - 1; /* The return value is also the expected length. */ - ret = ExpandEnvironmentStringsA(unexpanded_profiles_dir, lpProfilesDir, - expanded_len) - 1; + ret = ExpandEnvironmentStringsA(unexpanded_profiles_dir, lpProfilesDir, expanded_len); end: HeapFree(GetProcessHeap(), 0, unexpanded_profiles_dir); RegCloseKey(key);