MantisBT - Zandronum
View Issue Details
0000973Zandronum[All Projects] Bugpublic2012-08-15 10:452018-09-30 22:10
Zalewa 
Torr Samaho 
normalminoralways
closedfixed 
MicrosoftWindowsXP/Vista/7
1.0-beta 
3.03.0 
0000973: Escaped quote characters are not read properly from CMD line on Windows
To see how Microsoft resolves the problem of escaped quote characters I made a simple test to check how CommandLineToArgvW(GetCommandLineW()) WinAPI functions treat occurences of \". The result of this test was that each occurence of \" is treated as an escaped " character. Zandronum however messes everything up completely when for example an escaped quote character is used in +sv_hostname arg.
# Attempt to host your server with following command line: zandronum.exe -host -iwad doom2.wad +sv_hostname "Examp\"le Server"
# Discover that your server is named 'Examp'
No tags attached.
child of 0000942closed Zalewa Doomseeker Create Server dialog creates unescaped parameters through "Command Line" button 
child of 0002172closed Torr Samaho Zandronum Upgrade GZDoom base to 1.8.6 
Issue History
2012-08-15 10:45ZalewaNew Issue
2012-08-15 10:49ZalewaSummaryQuote characters from CMD line are not escaped on Windows => Escaped quote characters are not read properly from CMD line on Windows
2012-08-15 11:30ZzZomboNote Added: 0004369
2012-08-15 15:26Edward-sanNote Added: 0004372
2012-08-15 17:10ZalewaNote Added: 0004373
2012-08-15 19:18Torr SamahoNote Added: 0004374
2012-08-15 19:18Torr SamahoStatusnew => acknowledged
2012-08-15 19:18Torr SamahoResolutionopen => waiting for zdoom
2012-08-16 16:56ZalewaNote Added: 0004377
2012-09-08 18:11Blzut3Relationship addedchild of 0000942
2013-01-11 12:08Edward-sanNote Added: 0005734
2016-02-06 10:51Edward-sanNote Added: 0014340
2016-02-06 10:51Edward-sanAssigned To => Torr Samaho
2016-02-06 10:51Edward-sanStatusacknowledged => feedback
2016-02-06 10:51Edward-sanResolutionwaiting for zdoom => open
2016-02-06 10:51Edward-sanTarget Version => 3.0
2016-02-06 10:51Edward-sanRelationship addedchild of 0002172
2016-02-06 12:02Edward-sanStatusfeedback => needs testing
2016-02-06 17:33Ru5tK1ngNote Added: 0014368
2016-02-06 17:33Ru5tK1ngStatusneeds testing => resolved
2016-02-06 17:33Ru5tK1ngResolutionopen => fixed
2016-02-06 17:33Ru5tK1ngFixed in Version => 3.0
2016-02-06 19:06ZalewaNote Added: 0014376
2018-09-30 22:10Blzut3Statusresolved => closed

Notes
(0004369)
ZzZombo   
2012-08-15 11:30   
Also this occurs in log file names, in message that says "Log started".
(0004372)
Edward-san   
2012-08-15 15:26   
Is it different from gzdoom 323? If not, does it happen in latest zdoom?
(0004373)
Zalewa   
2012-08-15 17:10   
Is it a sufficient information that the same happens in ZDoom 2.6.1?
(0004374)
Torr Samaho   
2012-08-15 19:18   
Quote from Zalewa
Is it a sufficient information that the same happens in ZDoom 2.6.1?

Yes. In this case please report it at the ZDoom forum.
(0004377)
Zalewa   
2012-08-16 16:56   
'http://forum.zdoom.org/viewtopic.php?t=33763 [^]'
(0005734)
Edward-san   
2013-01-11 12:08   
Randi should have fixed the problem in r4025.
(0014340)
Edward-san   
2016-02-06 10:51   
Is it fixed in latest zandronum 3.0 beta?
(0014368)
Ru5tK1ng   
2016-02-06 17:33   
I hosted from the command line and my server name showed up properly with the escaped character from the example command.
(0014376)
Zalewa   
2016-02-06 19:06   
Command line arguments are still interpreted incorrectly in 3.0-alpha-r160131-2023. It is impossible to blank variables as described here:
'http://zandronum.com/tracker/view.php?id=2482 [^]'