diff options
author | James Brown | 2002-04-23 18:11:36 +0000 |
---|---|---|
committer | James Brown | 2002-04-23 18:11:36 +0000 |
commit | 72798160d86c7d1e9231642168e5ecc9418abb5f (patch) | |
tree | 72ef9c153479f5de841bb9955f73126c97adf58d /gameDetector.cpp | |
parent | c62c6637bfefc5796cd1516c3136baef825426b0 (diff) | |
download | scummvm-rg350-72798160d86c7d1e9231642168e5ecc9418abb5f.tar.gz scummvm-rg350-72798160d86c7d1e9231642168e5ecc9418abb5f.tar.bz2 scummvm-rg350-72798160d86c7d1e9231642168e5ecc9418abb5f.zip |
Quick patch to allow space between -p - Also remove compiler warning
svn-id: r4065
Diffstat (limited to 'gameDetector.cpp')
-rw-r--r-- | gameDetector.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gameDetector.cpp b/gameDetector.cpp index 2efa3031a3..da4a530e65 100644 --- a/gameDetector.cpp +++ b/gameDetector.cpp @@ -95,10 +95,15 @@ void GameDetector::parseCommandLine(int argc, char **argv) #endif exit(1); case 'p': - if (*(s + 1) == '\0') - goto ShowHelpAndExit; - _gameDataPath = s + 1; - goto NextArg; + if (*(s + 1) == '\0') { + if (i+1 < argc && argv[i+1] && argv[i+1][0] != '-' && argv[i+1][0] != '\0') { + i++; + _gameDataPath = argv[i]; + } else + goto ShowHelpAndExit; + } else + _gameDataPath = s + 1; + goto NextArg; case 't': if (*(s + 1) == '\0') goto ShowHelpAndExit; |