diff options
author | Filippos Karapetis | 2009-10-18 10:39:10 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-18 10:39:10 +0000 |
commit | 6d5f1e4403217e143cc93d80ac96a40faf8bbae5 (patch) | |
tree | 94484508e9be14c8e00ea4c46518ef5fe2b40a83 /engines | |
parent | c7e5c9f0edf9c59674152f71fc8143742e0964b7 (diff) | |
download | scummvm-rg350-6d5f1e4403217e143cc93d80ac96a40faf8bbae5.tar.gz scummvm-rg350-6d5f1e4403217e143cc93d80ac96a40faf8bbae5.tar.bz2 scummvm-rg350-6d5f1e4403217e143cc93d80ac96a40faf8bbae5.zip |
Added a sanity check in kStrAt()
svn-id: r45213
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kstring.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 2681ced5da..b31cd4018b 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -292,6 +292,11 @@ reg_t kStrCpy(EngineState *s, int argc, reg_t *argv) { reg_t kStrAt(EngineState *s, int argc, reg_t *argv) { + if (argv[0] == SIGNAL_REG) { + warning("Attempt to perform kStrAt() on a signal reg"); + return NULL_REG; + } + SegmentRef dest_r = s->_segMan->dereference(argv[0]); if (!dest_r.raw) { warning("Attempt to StrAt at invalid pointer %04x:%04x", PRINT_REG(argv[0])); |