diff options
-rw-r--r-- | engines/gob/inter.h | 2 | ||||
-rw-r--r-- | engines/gob/inter_playtoons.cpp | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/engines/gob/inter.h b/engines/gob/inter.h index e8f39c8db8..057f52b360 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -560,7 +560,7 @@ protected: bool oPlaytoons_checkData(OpFuncParams ¶ms); void oPlaytoons_CD_20_23(); void oPlaytoons_CD_25(); - void oPlaytoons_openItk(); + void oPlaytoons_openItk(); }; } // End of namespace Gob diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp index b4a3c36e99..ab7bf819cc 100644 --- a/engines/gob/inter_playtoons.cpp +++ b/engines/gob/inter_playtoons.cpp @@ -140,18 +140,17 @@ void Inter_Playtoons::oPlaytoons_CD_25() { } void Inter_Playtoons::oPlaytoons_openItk() { - char fileName[128]; char *backSlash; - + _vm->_game->_script->evalExpr(0); strncpy0(fileName, _vm->_game->_script->getResultStr(), 124); - + if (!strchr(fileName, '.')) strcat(fileName, ".ITK"); - + // Workaround for Bambou : In the script, the path is hardcoded (!!) - if (backSlash=strrchr(fileName, '\\')) { + if ((backSlash = strrchr(fileName, '\\')) != 0) { debugC(2, kDebugFileIO, "Opening ITK file \"%s\" instead of \"%s\"", backSlash + 1, fileName); _vm->_dataIO->openDataFile(backSlash + 1, true); } else |