aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2011-01-30 00:03:35 +0000
committerSven Hesse2011-01-30 00:03:35 +0000
commite4a9cafab8a620163f2a908265b6fb75171a3c2e (patch)
tree58efae6dcf97a228f7b7255b0918cbd74b3d7535
parent4588d4cc97aafad974651a50cb8d58d7123dde54 (diff)
downloadscummvm-rg350-e4a9cafab8a620163f2a908265b6fb75171a3c2e.tar.gz
scummvm-rg350-e4a9cafab8a620163f2a908265b6fb75171a3c2e.tar.bz2
scummvm-rg350-e4a9cafab8a620163f2a908265b6fb75171a3c2e.zip
GOB: Add a sanity check to the copyFile stub
svn-id: r55647
-rw-r--r--engines/gob/inter_playtoons.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp
index 71ce0ec5a2..06153b2dee 100644
--- a/engines/gob/inter_playtoons.cpp
+++ b/engines/gob/inter_playtoons.cpp
@@ -366,8 +366,16 @@ void Inter_Playtoons::oPlaytoons_CD_25() {
}
void Inter_Playtoons::oPlaytoons_copyFile() {
- Common::String file1 = _vm->_game->_script->evalString();
- Common::String file2 = _vm->_game->_script->evalString();
+ Common::String path1 = _vm->_game->_script->evalString();
+ Common::String path2 = _vm->_game->_script->evalString();
+
+ Common::String file1 = getFile(path1.c_str());
+ Common::String file2 = getFile(path2.c_str());
+
+ if (file1.equalsIgnoreCase(file2)) {
+ warning("oPlaytoons_copyFile(): \"%s\" == \"%s\"", path1.c_str(), path2.c_str());
+ return;
+ }
warning("Playtoons Stub: copy file from \"%s\" to \"%s\"", file1.c_str(), file2.c_str());
}