From c1d262f66d435a65ec5a517fe6c817ea20e54636 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 26 Jun 2015 09:01:27 +0200 Subject: [PATCH] kernel32: GetCurrentDirectoryW gets characters, not bytes. --- dlls/kernel32/volume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c index 7cb245aca9c..7a1dc11e67f 100644 --- a/dlls/kernel32/volume.c +++ b/dlls/kernel32/volume.c @@ -1911,7 +1911,7 @@ BOOL WINAPI GetVolumePathNameW(LPCWSTR filename, LPWSTR volumepathname, DWORD bu goto cleanup; } } - else if (GetCurrentDirectoryW( sizeof(cwdW), cwdW )) + else if (GetCurrentDirectoryW( sizeof(cwdW)/sizeof(cwdW[0]), cwdW )) { /* if the path is completely bogus then revert to the drive of the working directory */ fallbackpathW[0] = cwdW[0]; -- 2.11.4.GIT