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 - ParseCommandLine() lacks support for escaped doublequote
Summary: ParseCommandLine() lacks support for escaped doublequote
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: main (show other bugs)
Version: HG 1.2
Hardware: x86 Windows (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-10 14:52 UTC by Tony J. White
Modified: 2007-12-29 10:58 UTC (History)
0 users

See Also:


Attachments
svn3450 - support escaped doublequote chars in command line arguments (1.40 KB, patch)
2007-10-10 14:53 UTC, Tony J. White
Details | Diff
svn3450 - support escaped doublequote chars in command line arguments #2 (1.38 KB, patch)
2007-10-10 15:01 UTC, Tony J. White
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!