Commit 08aa50ec authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

shell32: GetModuleFileNameW gets number of WCHARs not bytes.

parent 15f8b80b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment