diff options
author | Willem Jan Palenstijn | 2009-09-27 01:49:35 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-09-27 01:49:35 +0000 |
commit | 933bdcf8296d008483131c5ba00919eba7b63ae9 (patch) | |
tree | 549d628123d4892524c6ec11475fe3b34bb202cc /engines | |
parent | f7d7140876a3f516025f3e54f63696f49f44e5ee (diff) | |
download | scummvm-rg350-933bdcf8296d008483131c5ba00919eba7b63ae9.tar.gz scummvm-rg350-933bdcf8296d008483131c5ba00919eba7b63ae9.tar.bz2 scummvm-rg350-933bdcf8296d008483131c5ba00919eba7b63ae9.zip |
SCI: Add warning when dereferencing non-aligned stack pointer
svn-id: r44386
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/segment.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index 5410d82c24..793878f7b5 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -277,6 +277,8 @@ SegmentRef DataStack::dereference(reg_t pointer) { ret.isRaw = false; // reg_t based data! ret.maxSize = _capacity * sizeof(reg_t); // FIXME: Is this correct? See comment in LocalVariables::dereference + if (pointer.offset & 1) + warning("LocalVariables::dereference: Odd offset in pointer %04x:%04x", PRINT_REG(pointer)); ret.raw = (byte *)_entries + pointer.offset; return ret; } |