diff options
-rw-r--r-- | engines/sci/console.cpp | 4 | ||||
-rw-r--r-- | engines/sci/engine/guest_additions.cpp | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 0e90f22eba..99c5498443 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -4211,14 +4211,14 @@ bool Console::cmdMapVocab994(int argc, const char **argv) { if (obj && ofs < obj->getVarCount()) { uint16 varSelector = obj->getVarSelector(ofs); debugPrintf("%d: property at index %04x of %s is %s %s\n", i, ofs, - s->_segMan->derefString(obj->getNameSelector()), + s->_segMan->getObjectName(reg), _engine->getKernel()->getSelectorName(varSelector).c_str(), markers[varSelector] ? "(repeat!)" : ""); markers[varSelector] = true; } else { debugPrintf("%d: property at index %04x doesn't match up with %s\n", i, ofs, - s->_segMan->derefString(obj->getNameSelector())); + s->_segMan->getObjectName(reg)); } } diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp index e2b7354bdf..23f600fe5f 100644 --- a/engines/sci/engine/guest_additions.cpp +++ b/engines/sci/engine/guest_additions.cpp @@ -359,14 +359,10 @@ static const byte SRDialogPatch[] = { }; void GuestAdditions::patchGameSaveRestoreSCI32(Script &script) const { - ObjMap &objMap = script.getObjectMap(); - for (ObjMap::iterator it = objMap.begin(); it != objMap.end(); ++it) { - Object &obj = it->_value; - if (obj.getNameSelector().isNull()) { - continue; - } - - if (Common::String(_segMan->derefString(obj.getNameSelector())) != "SRDialog") { + const ObjMap &objMap = script.getObjectMap(); + for (ObjMap::const_iterator it = objMap.begin(); it != objMap.end(); ++it) { + const Object &obj = it->_value; + if (strncmp(_segMan->getObjectName(obj.getPos()), "SRDialog", 8) != 0) { continue; } |