[Scummvm-git-logs] scummvm master -> 5fa728371f9d01f9fb268596d961ad841825a456
sev-
sev at scummvm.org
Thu Feb 23 19:20:10 CET 2017
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
78f6038537 DIRECTOR: Lingo: Do not pollute stack in c_assign()
70eddbcdb0 DIRECTOR: Lingo: Fix stack underflow in argument assignment
6047e35bfd DIRECTOR: Lingo: Clean file name of 8-bit character before loading
5fa728371f DIRECTOR: Lingo: Try cleaned file names only when it makes sense
Commit: 78f60385378ed86118e2117f5ec771cd21051f1c
https://github.com/scummvm/scummvm/commit/78f60385378ed86118e2117f5ec771cd21051f1c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-23T18:54:33+01:00
Commit Message:
DIRECTOR: Lingo: Do not pollute stack in c_assign()
Changed paths:
engines/director/lingo/lingo-code.cpp
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 4841986..3484e53 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -314,7 +314,6 @@ void Lingo::c_assign() {
warning("STUB: c_assing REFERENCE");
- g_lingo->push(d1);
return;
}
@@ -350,8 +349,6 @@ void Lingo::c_assign() {
}
d1.u.sym->type = d2.type;
-
- g_lingo->push(d1);
}
bool Lingo::verify(Symbol *s) {
Commit: 70eddbcdb0f0f3720897b069955f4a007fe5ebfe
https://github.com/scummvm/scummvm/commit/70eddbcdb0f0f3720897b069955f4a007fe5ebfe
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-23T19:04:26+01:00
Commit Message:
DIRECTOR: Lingo: Fix stack underflow in argument assignment
Changed paths:
engines/director/lingo/lingo-codegen.cpp
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index 8347d93..7e029cb 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -311,7 +311,6 @@ void Lingo::codeArgStore() {
code1(c_varpush);
codeString(arg->c_str());
code1(c_assign);
- code1(c_xpop);
delete arg;
}
Commit: 6047e35bfdc568beecc25ff6adffe77e1543cc1a
https://github.com/scummvm/scummvm/commit/6047e35bfdc568beecc25ff6adffe77e1543cc1a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-23T19:06:10+01:00
Commit Message:
DIRECTOR: Lingo: Clean file name of 8-bit character before loading
Mac has had possibility to have 8-bit characters in their filenames.
In the modern world it goes with either codepages or UTF-8, which
makes it much less compatible. Trying to mitigate that
Changed paths:
engines/director/lingo/lingo-funcs.cpp
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp
index ddc51f4..f8a17f3 100644
--- a/engines/director/lingo/lingo-funcs.cpp
+++ b/engines/director/lingo/lingo-funcs.cpp
@@ -180,17 +180,29 @@ void Lingo::func_goto(Datum &frame, Datum &movie) {
if (movie.type != VOID) {
movie.toString();
+ Common::String cleanedFilename;
+
+ for (const char *p = movie.u.s->c_str(); *p; p++)
+ if (*p >= 0x20 && *p <= 0x7f)
+ cleanedFilename += *p;
+
bool fileExists = false;
if (_vm->getPlatform() == Common::kPlatformMacintosh) {
Common::MacResManager resMan;
if (resMan.open(*movie.u.s)) {
fileExists = true;
+ cleanedFilename = *movie.u.s;
+ } else if (resMan.open(cleanedFilename)) {
+ fileExists = true;
}
} else {
Common::File file;
if (file.open(*movie.u.s)) {
fileExists = true;
+ cleanedFilename = *movie.u.s;
+ } else if (file.open(cleanedFilename)) {
+ fileExists = true;
}
}
@@ -199,7 +211,7 @@ void Lingo::func_goto(Datum &frame, Datum &movie) {
return;
}
- _vm->_nextMovie = *movie.u.s;
+ _vm->_nextMovie = cleanedFilename;
_vm->getCurrentScore()->_stopPlay = true;
_vm->_nextMovieFrameS.clear();
Commit: 5fa728371f9d01f9fb268596d961ad841825a456
https://github.com/scummvm/scummvm/commit/5fa728371f9d01f9fb268596d961ad841825a456
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-23T19:09:54+01:00
Commit Message:
DIRECTOR: Lingo: Try cleaned file names only when it makes sense
Changed paths:
engines/director/lingo/lingo-funcs.cpp
diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp
index f8a17f3..339ad9a 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;
}
}
More information about the Scummvm-git-logs
mailing list