[PATCH] kernel32: GetCurrentDirectoryW gets characters, not bytes

Marcus Meissner marcus at jet.franken.de
Fri Jun 26 02:01:27 CDT 2015


---
 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 469d3d6..7d17aa0 100644
--- a/dlls/kernel32/volume.c
+++ b/dlls/kernel32/volume.c
@@ -1921,7 +1921,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];
-- 
1.8.4.5




More information about the wine-patches mailing list