From 9ecbffe11aee736c0a3783358fb2640b0d6f5237 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 21 Jun 2010 15:51:04 +0000 Subject: Add a workaround for a MUMG script bug, MUMG now works again. svn-id: r50117 --- engines/sci/engine/vm.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines') 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; -- cgit v1.2.3