aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/gameDetector.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp
index 3ecc7cd892..4ce65973de 100644
--- a/base/gameDetector.cpp
+++ b/base/gameDetector.cpp
@@ -321,7 +321,8 @@ GameDescriptor GameDetector::findGame(const String &gameName, const Plugin **plu
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;