diff options
author | Filippos Karapetis | 2009-10-20 10:08:28 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-20 10:08:28 +0000 |
commit | a88aa2f45f651f61b7c2ff851eff13cfe15a37c0 (patch) | |
tree | e5a7a428133a4d2c9e1db3980982159efdea4391 /engines/sci/engine/seg_manager.cpp | |
parent | c0f6657797d1d7bfeb64acf6cb3f2b1c0748e7ef (diff) | |
download | scummvm-rg350-a88aa2f45f651f61b7c2ff851eff13cfe15a37c0.tar.gz scummvm-rg350-a88aa2f45f651f61b7c2ff851eff13cfe15a37c0.tar.bz2 scummvm-rg350-a88aa2f45f651f61b7c2ff851eff13cfe15a37c0.zip |
- Fixed the pathfinding issue for LSL5 room 640, where Patti walks off-screen (we still need a proper way of detecting this, though...)
- Made warnings where invalid pointers are dereferenced more precise
svn-id: r45257
Diffstat (limited to 'engines/sci/engine/seg_manager.cpp')
-rw-r--r-- | engines/sci/engine/seg_manager.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 3cb4a5d0f1..2af038185b 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -877,7 +877,7 @@ SegmentRef SegManager::dereference(reg_t pointer) { if (!pointer.segment || (pointer.segment >= _heap.size()) || !_heap[pointer.segment]) { // This occurs in KQ5CD when interacting with certain objects - warning("Attempt to dereference invalid pointer %04x:%04x", PRINT_REG(pointer)); + warning("SegManager::dereference(): Attempt to dereference invalid pointer %04x:%04x", PRINT_REG(pointer)); return ret; /* Invalid */ } @@ -1158,12 +1158,11 @@ size_t SegManager::strlen(reg_t str) { } -Common::String SegManager::getString(reg_t pointer, int entries) -{ +Common::String SegManager::getString(reg_t pointer, int entries) { Common::String ret; SegmentRef src_r = dereference(pointer); if (!src_r.isValid()) { - warning("Attempt to dereference invalid pointer %04x:%04x", PRINT_REG(pointer)); + warning("SegManager::getString(): Attempt to dereference invalid pointer %04x:%04x", PRINT_REG(pointer)); return ret; } if (entries > src_r.maxSize) { |