http://bugs.winehq.org/show_bug.cgi?id=21758
Summary: another CommandLineToArgvW bug with empty lpCmdLine Product: Wine Version: 1.1.38 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: shell32 AssignedTo: wine-bugs@winehq.org ReportedBy: pleasenospam325@mail.ru
CommandLineToArgvW() with empty lpCmdLine truncates result to 6 characters.
http://source.winehq.org/git/wine.git/?a=blob;f=dlls/shell32/shell32_main.c;...
Looks like some bug in GetModuleFileName() was fixed and this broke CommandLineToArgvW
Test: (builds with mingw) ************************************* #include <windows.h> #include <stdio.h>
int main() { int i, numargs; for (i = 0; i < numargs; i++) { printf("argv[%d]: %S\n", i, CommandLineToArgvW(L"", &numargs)[i]); } return 0; } ************************************* result: ************************************* [il@archvm ~]$ pwd /home/il [il@archvm ~]$ wine commandlinetoargv.exe argv[0]: Z:\hom [il@archvm ~]$