diff options
author | Filippos Karapetis | 2009-06-04 08:25:48 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-06-04 08:25:48 +0000 |
commit | 634e0234852ebb37d6cb10bc627d84ebaf35d56f (patch) | |
tree | 6a91f1c5fe4b773d93ad3ebabc34349e59cfda80 /engines/sci/engine | |
parent | 3235fd3f65bb9043126900b8fb32850bd49aa0df (diff) | |
download | scummvm-rg350-634e0234852ebb37d6cb10bc627d84ebaf35d56f.tar.gz scummvm-rg350-634e0234852ebb37d6cb10bc627d84ebaf35d56f.tar.bz2 scummvm-rg350-634e0234852ebb37d6cb10bc627d84ebaf35d56f.zip |
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
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/vm.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
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); |