aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2010-06-21 15:51:04 +0000
committerMatthew Hoops2010-06-21 15:51:04 +0000
commit9ecbffe11aee736c0a3783358fb2640b0d6f5237 (patch)
tree691c32db486a875e9378bdc3ec9f2efadaa8cf14 /engines
parent65fe8d817c627fe56929533a4a0fb4d2c5cb76c2 (diff)
downloadscummvm-rg350-9ecbffe11aee736c0a3783358fb2640b0d6f5237.tar.gz
scummvm-rg350-9ecbffe11aee736c0a3783358fb2640b0d6f5237.tar.bz2
scummvm-rg350-9ecbffe11aee736c0a3783358fb2640b0d6f5237.zip
Add a workaround for a MUMG script bug, MUMG now works again.
svn-id: r50117
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/vm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 706d2ceb22..7f2ed436e8 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -161,6 +161,11 @@ static bool validate_variable(reg_t *r, reg_t *stack_base, int type, int max, in
error("%s. [VM] Access would be outside even of the stack (%d); access denied", txt.c_str(), total_offset);
return false;
} else {
+ // WORKAROUND: Mixed-Up Mother Goose tries to use an invalid parameter in Event::new().
+ // Just skip around it here so we don't error out in validate_arithmetic.
+ if (g_sci->getGameId() == "mothergoose" && getSciVersion() <= SCI_VERSION_1_1 && type == VAR_PARAM && index == 1)
+ return false;
+
debugC(2, kDebugLevelVM, "%s", txt.c_str());
debugC(2, kDebugLevelVM, "[VM] Access within stack boundaries; access granted.");
return true;