diff options
author | Filippos Karapetis | 2010-05-28 16:47:30 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-28 16:47:30 +0000 |
commit | 5d21ff280a30347362701ee177ab54f85e18e712 (patch) | |
tree | 245cc4d68259c85027fa877652c1df02f48d6f7e /engines/sci/engine/kmisc.cpp | |
parent | 5b12fda0596b8b05768cc073b681d61c1493cf8e (diff) | |
download | scummvm-rg350-5d21ff280a30347362701ee177ab54f85e18e712.tar.gz scummvm-rg350-5d21ff280a30347362701ee177ab54f85e18e712.tar.bz2 scummvm-rg350-5d21ff280a30347362701ee177ab54f85e18e712.zip |
Silenced some superfluous warnings in KQ5CD
svn-id: r49294
Diffstat (limited to 'engines/sci/engine/kmisc.cpp')
-rw-r--r-- | engines/sci/engine/kmisc.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index c05a2bc57b..68dc2fbba4 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -252,10 +252,15 @@ reg_t kMemory(EngineState *s, int argc, reg_t *argv) { break; } case K_MEMORY_PEEK : { + if (!argv[1].segment) { + // This occurs in KQ5CD when interacting with certain objects + warning("Attempt to peek invalid memory at %04x:%04x", PRINT_REG(argv[1])); + return s->r_acc; + } + SegmentRef ref = s->_segMan->dereference(argv[1]); if (!ref.isValid() || ref.maxSize < 2) { - // This occurs in KQ5CD when interacting with certain objects warning("Attempt to peek invalid memory at %04x:%04x", PRINT_REG(argv[1])); return s->r_acc; } |