We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 503

Summary: ParseCommandLine() lacks support for escaped doublequote
Product: SDL Reporter: Tony J. White <tjw>
Component: mainAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 1.2   
Hardware: x86   
OS: Windows (All)   
Attachments: svn3450 - support escaped doublequote chars in command line arguments
svn3450 - support escaped doublequote chars in command line arguments #2

Description Tony J. White 2007-10-10 14:52:24 UTC
The ParseCommandLine() function in SDL_win32_main.c does not support escaped doublequotes (").  This is problematic when trying to pass a quoted string to an SDL application on the command line.  For instance, to start ioquake3 with a specified fs_homepath, I would run:

ioquake3.x86.exe +set fs_homepath "\"C:\Program Files\Quake 3\""

When using the SDL version of ioquake3.exe, the parsing ends at the second doublequote so the fs_homepath becomes just \.

Attached patch adds support for parsing escaped double quotes.
Comment 1 Tony J. White 2007-10-10 14:53:12 UTC
Created attachment 234 [details]
svn3450 - support escaped doublequote chars in command line arguments
Comment 2 Tony J. White 2007-10-10 15:01:45 UTC
Created attachment 235 [details]
svn3450 - support escaped doublequote chars in command line  arguments #2

removed unused variable
Comment 3 Sam Lantinga 2007-12-29 10:58:51 UTC
This is in subversion with revision 3487.  Thanks!