[Scummvm-cvs-logs] SF.net SVN: scummvm: [21565] scummvm/trunk/base/gameDetector.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Apr 2 13:31:02 CEST 2006


Revision: 21565
Author:   fingolfin
Date:     2006-04-02 13:29:54 -0700 (Sun, 02 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21565&view=rev

Log Message:
-----------
Fixed '-f BAR' command line argument style (as opposed to '-fBAR' and '-foo=BAR')

Modified Paths:
--------------
    scummvm/trunk/base/gameDetector.cpp
Modified: scummvm/trunk/base/gameDetector.cpp
===================================================================
--- scummvm/trunk/base/gameDetector.cpp	2006-04-02 20:27:56 UTC (rev 21564)
+++ scummvm/trunk/base/gameDetector.cpp	2006-04-02 20:29:54 UTC (rev 21565)
@@ -321,7 +321,8 @@
 	if (isLongCmd ? (!memcmp(s, longCmd"=", sizeof(longCmd"=") - 1)) : (shortCmdLower == shortCmd)) { \
 		if (isLongCmd) \
 			s += sizeof(longCmd"=") - 1; \
-		const char *option = (*s != '\0') ? s : s2; \
+		const char *option = s; \
+		if (*s == '\0') { option = s2; i++; } \
 		if (!option) option = defaultVal; \
 		if (option) settings[longCmd] = option;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list