From 634e0234852ebb37d6cb10bc627d84ebaf35d56f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 4 Jun 2009 08:25:48 +0000 Subject: Turned debug_weak_validations on by default again, as apparently some games like SQ3 fail in some validations (e.g. when loading). Also, fixed a potential out of bounds access when copying the value of __FILE__ into a buffer (as its value can be quite long in some cases). svn-id: r41154 --- engines/sci/engine/vm.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'engines/sci/engine') diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 18e1ef7866..3539032760 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -121,15 +121,13 @@ static int validate_variable(reg_t *r, reg_t *stack_base, int type, int max, int if (index < 0 || index >= max) { char txt[200]; char tmp[40]; - sprintf(txt, "[VM] Attempt to use invalid %s variable %04x ", names[type], index); + sprintf(txt, "[VM] validate_variable(): Attempt to use invalid %s variable %04x ", names[type], index); if (max == 0) strcat(txt, "(variable type invalid)"); else { sprintf(tmp, "(out of range [%d..%d])", 0, max - 1); strcat(txt, tmp); } - sprintf(tmp, " in %s, line %d\n", __FILE__, line); - strcat(txt, tmp); if (debug_weak_validations) warning(txt); -- cgit v1.2.3