shell32: GetModuleFileNameW gets number of WCHARs not bytes.
This commit is contained in:
parent
15f8b80ba7
commit
08aa50ec2b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue