diff options
author | Filippos Karapetis | 2011-01-15 12:18:13 +0000 |
---|---|---|
committer | Filippos Karapetis | 2011-01-15 12:18:13 +0000 |
commit | 0f9c33e02f1cb2c740c1eb0dcaad96dd22ec29e7 (patch) | |
tree | 81d3a47376722a15044b01f49830bcf96032d677 /engines/sci/engine | |
parent | c8b3200dd355d0f54928fdb04472bf2363df80fe (diff) | |
download | scummvm-rg350-0f9c33e02f1cb2c740c1eb0dcaad96dd22ec29e7.tar.gz scummvm-rg350-0f9c33e02f1cb2c740c1eb0dcaad96dd22ec29e7.tar.bz2 scummvm-rg350-0f9c33e02f1cb2c740c1eb0dcaad96dd22ec29e7.zip |
SCI: cleaned up checkSelectorBreakpoint()
svn-id: r55250
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/vm.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 244e3b0b6a..6d11a1ad8a 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -395,18 +395,13 @@ struct CallsStruct { }; bool SciEngine::checkSelectorBreakpoint(BreakpointType breakpointType, reg_t send_obj, int selector) { - char method_name[256]; + Common::String methodName = _gamestate->_segMan->getObjectName(send_obj); + methodName += ("::" + getKernel()->getSelectorName(selector)); - sprintf(method_name, "%s::%s", _gamestate->_segMan->getObjectName(send_obj), getKernel()->getSelectorName(selector).c_str()); - - Common::List<Breakpoint>::const_iterator bp; - for (bp = _debugState._breakpoints.begin(); bp != _debugState._breakpoints.end(); ++bp) { - int cmplen = bp->name.size(); - if (bp->name.lastChar() != ':') - cmplen = 256; - - if (bp->type == breakpointType && !strncmp(bp->name.c_str(), method_name, cmplen)) { - _console->DebugPrintf("Break on %s (in [%04x:%04x])\n", method_name, PRINT_REG(send_obj)); + Common::List<Breakpoint>::const_iterator bpIter; + for (bpIter = _debugState._breakpoints.begin(); bpIter != _debugState._breakpoints.end(); ++bpIter) { + if ((*bpIter).type == breakpointType && (*bpIter).name == methodName) { + _console->DebugPrintf("Break on %s (in [%04x:%04x])\n", methodName.c_str(), PRINT_REG(send_obj)); _debugState.debugging = true; _debugState.breakpointWasHit = true; return true; |