From e4a9cafab8a620163f2a908265b6fb75171a3c2e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 30 Jan 2011 00:03:35 +0000 Subject: GOB: Add a sanity check to the copyFile stub svn-id: r55647 --- engines/gob/inter_playtoons.cpp | 12 ++++++++++-- 1 file 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()); } -- cgit v1.2.3