From 23b3e4cc7da9797d8dcccf7d93a6dd2571272644 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 18 Oct 2003 00:25:13 +0000 Subject: 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 --- base/gameDetector.cpp | 8 ++++---- 1 file 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) { -- cgit v1.2.3