aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2017-02-23 19:09:54 +0100
committerEugene Sandulenko2017-02-23 19:09:54 +0100
commit5fa728371f9d01f9fb268596d961ad841825a456 (patch)
tree259ac5939c311162b159bd7f7aca10c25f20081b
parent6047e35bfdc568beecc25ff6adffe77e1543cc1a (diff)
downloadscummvm-rg350-5fa728371f9d01f9fb268596d961ad841825a456.tar.gz
scummvm-rg350-5fa728371f9d01f9fb268596d961ad841825a456.tar.bz2
scummvm-rg350-5fa728371f9d01f9fb268596d961ad841825a456.zip
DIRECTOR: Lingo: Try cleaned file names only when it makes sense
-rw-r--r--engines/director/lingo/lingo-funcs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp
index f8a17f3bdb..339ad9af85 100644
--- a/engines/director/lingo/lingo-funcs.cpp
+++ b/engines/director/lingo/lingo-funcs.cpp
@@ -193,7 +193,7 @@ void Lingo::func_goto(Datum &frame, Datum &movie) {
if (resMan.open(*movie.u.s)) {
fileExists = true;
cleanedFilename = *movie.u.s;
- } else if (resMan.open(cleanedFilename)) {
+ } else if (!movie.u.s->equals(cleanedFilename) && resMan.open(cleanedFilename)) {
fileExists = true;
}
} else {
@@ -201,7 +201,7 @@ void Lingo::func_goto(Datum &frame, Datum &movie) {
if (file.open(*movie.u.s)) {
fileExists = true;
cleanedFilename = *movie.u.s;
- } else if (file.open(cleanedFilename)) {
+ } else if (!movie.u.s->equals(cleanedFilename) && file.open(cleanedFilename)) {
fileExists = true;
}
}