aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/vm.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-30 07:11:38 +0000
committerFilippos Karapetis2010-01-30 07:11:38 +0000
commit28aee9c5f3462cd72db0b91b7f578649869738d5 (patch)
tree045ff7144350e6fd38c08fe81e1d3ce648ef6943 /engines/sci/engine/vm.cpp
parent6066c9baa28a2937b1d359b0b50d4bab77d1c664 (diff)
downloadscummvm-rg350-28aee9c5f3462cd72db0b91b7f578649869738d5.tar.gz
scummvm-rg350-28aee9c5f3462cd72db0b91b7f578649869738d5.tar.bz2
scummvm-rg350-28aee9c5f3462cd72db0b91b7f578649869738d5.zip
Silenced a very annoying warning
svn-id: r47704
Diffstat (limited to 'engines/sci/engine/vm.cpp')
-rw-r--r--engines/sci/engine/vm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 83f8f5e01a..5d627344cf 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -119,14 +119,14 @@ static bool validate_variable(reg_t *r, reg_t *stack_base, int type, int max, in
else
txt += Common::String::printf("(out of range [%d..%d])", 0, max - 1);
- warning("%s", txt.c_str());
-
if (type == VAR_PARAM || type == VAR_TEMP) {
int total_offset = r - stack_base;
if (total_offset < 0 || total_offset >= VM_STACK_SIZE) {
+ warning("%s", txt.c_str());
warning("[VM] Access would be outside even of the stack (%d); access denied", total_offset);
return false;
} else {
+ debugC(2, kDebugLevelVM, txt.c_str());
debugC(2, kDebugLevelVM, "[VM] Access within stack boundaries; access granted.\n");
return true;
}