http://bugs.winehq.org/show_bug.cgi?id=17759
Summary: CommandLineToArgvW bug with empty lpCmdLine Product: Wine Version: 1.1.17 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P3 Component: shell32 AssignedTo: wine-bugs@winehq.org ReportedBy: mb@smartftp.com
CommandLineToArgvW returns the wrong NumArgs (2 instead of 1) when an empty lpCmdLine is passed:
How to reproduce ================ int nNumArgs = 0; LPWSTR *Argv = ::CommandLineToArgvW(L"", &nNumArgs); if(Argv) { ASSERT(nNumArgs == 1);
if(nNumArgs == 2) { // Access violation wprintf(Argv[1]); } }
MSDN Documentation on how to handle empty lpCmdLine =================================================== "If this parameter is an empty string the function returns the path to the current executable file." Reference: http://msdn.microsoft.com/en-us/library/bb776391(VS.85).aspx
Regards, Mat SmartFTP
http://bugs.winehq.org/show_bug.cgi?id=17759
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |testcase
--- Comment #1 from Vitaliy Margolen vitaliy@kievinfo.com 2009-03-15 21:30:37 --- Confirming. Fix sent: http://www.winehq.org/pipermail/wine-patches/2009-March/070772.html
http://bugs.winehq.org/show_bug.cgi?id=17759
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #2 from Austin English austinenglish@gmail.com 2009-03-23 13:20:39 --- Fixed by 694219d4a66e7291213d2bdedd8dc995fdf16cf5.
http://bugs.winehq.org/show_bug.cgi?id=17759
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org 2009-03-27 13:56:54 --- Closing bugs fixed in 1.1.18.