aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-10-18 00:25:13 +0000
committerMax Horn2003-10-18 00:25:13 +0000
commit23b3e4cc7da9797d8dcccf7d93a6dd2571272644 (patch)
tree98e18ef4aeec1edfa7f67c57ccbaa4eb1457c9b2
parent33f2fbff08573634e868c50d5cff3e4d2482a543 (diff)
downloadscummvm-rg350-23b3e4cc7da9797d8dcccf7d93a6dd2571272644.tar.gz
scummvm-rg350-23b3e4cc7da9797d8dcccf7d93a6dd2571272644.tar.bz2
scummvm-rg350-23b3e4cc7da9797d8dcccf7d93a6dd2571272644.zip
fix handling of unknown targets (previously, you could invoke scummvm with a randomg string, e.g. 'scumvmm foobar', and it wouldn't error out as it should)
svn-id: r10884
-rw-r--r--base/gameDetector.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp
index 1d1fc39cea..e2caebc04a 100644
--- a/base/gameDetector.cpp
+++ b/base/gameDetector.cpp
@@ -463,11 +463,11 @@ void GameDetector::parseCommandLine(int argc, char **argv) {
}
}
- return;
-
+ if (current_option) {
ShowHelpAndExit:
- printf(USAGE_STRING);
- exit(1);
+ printf(USAGE_STRING);
+ exit(1);
+ }
}
void GameDetector::setTarget(const String &name) {