aboutsummaryrefslogtreecommitdiff
path: root/gameDetector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gameDetector.cpp')
-rw-r--r--gameDetector.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/gameDetector.cpp b/gameDetector.cpp
index f378b511be..af2847dd87 100644
--- a/gameDetector.cpp
+++ b/gameDetector.cpp
@@ -530,6 +530,11 @@ int GameDetector::detectMain(int argc, char **argv)
if (!_gameDataPath) {
warning("No path was provided. Assuming the data files are in the current directory");
_gameDataPath = Scumm::Strdup("");
+ } else if (_gameDataPath[strlen(_gameDataPath)-1] != '/' && _gameDataPath[strlen(_gameDataPath)-1] != '\\') {
+ char slashless[1024]; /* Append slash to path */
+ strcpy(slashless, _gameDataPath);
+ _gameDataPath = (char *)malloc((strlen(slashless) + 1) * sizeof(char));
+ sprintf(_gameDataPath, "%s/", slashless);
}
if (_amiga)