[PATCH] programs/explorer: Fix explorer's command line parsing (try 2)
Vitaliy Margolen
wine-devel at kievinfo.com
Mon Jan 9 08:46:11 CST 2012
On 01/08/2012 08:45 PM, Jay Yang wrote:
> Fixed some small formatting issues from last time.
>
Your patch strips spaces all over the place. For example:
+ LPWSTR *argv;
+ if(commandline[0]=='\0')
Need an empty line after variable declarations.
No space after "if". No space around equal operator.
+ for(i=0;i<argc;i++)
No spaces after semi-colon.
+ copy_path_string(parameters->root,curr);
No space after coma.
Some other issues - you will parse over parameters given to the program. Ex:
explorer /desktop=foo,800x600 program.exe /n /e
Parsing inside parameters is incorrect:
+ LPWSTR end=strchrW(curr,',');
+ LPWSTR next;
+ if(end==NULL)
+ next=(end=strchrW(curr,'\0'));
+ else
+ next=end+1;
...
+ curr=next;
You end up parsing something like this as a valid param:
/n,/e,/select,c:\\
Vitaliy.
More information about the wine-devel
mailing list