Marcus Meissner : shell32: GetModuleFileNameW gets number of WCHARs not bytes.
Alexandre Julliard
julliard at winehq.org
Mon Nov 26 08:16:26 CST 2007
Module: wine
Branch: master
Commit: 08aa50ec2b5042c7d99fbf7fa33e312d199b50dc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=08aa50ec2b5042c7d99fbf7fa33e312d199b50dc
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Thu Nov 22 08:24:17 2007 +0100
shell32: GetModuleFileNameW gets number of WCHARs not bytes.
---
dlls/shell32/shell32_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
index 63f81f3..0b7a8f3 100644
--- a/dlls/shell32/shell32_main.c
+++ b/dlls/shell32/shell32_main.c
@@ -101,7 +101,7 @@ LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int* numargs)
argv=GlobalLock(hargv);
for (;;)
{
- len = GetModuleFileNameW(0, (LPWSTR)(argv+1), size-sizeof(LPWSTR));
+ len = GetModuleFileNameW(0, (LPWSTR)(argv+1), (size-sizeof(LPWSTR))/sizeof(WCHAR));
if (!len)
{
GlobalFree(hargv);
More information about the wine-cvs
mailing list