From 099a29b6bf5dff9a02100aaff2b70146dc1de674 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 26 May 2009 15:06:21 +0000 Subject: SCI: Added 'opcodes' command to the debugger; fixed output wrapping in the selectors & kernelnames debugger commands svn-id: r40919 --- engines/sci/engine/scriptdebug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sci/engine') diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 0b86a411cf..ba75d0a854 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -1221,7 +1221,7 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod reg_t retval = make_reg(pos.segment, pos.offset + 1); uint16 param_value; int opsize; - int opcode; + uint opcode; int bytecount = 1; int i = 0; @@ -1298,7 +1298,7 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod if (print_bw_tag) sciprintf("[%c] ", opsize ? 'B' : 'W'); - sciprintf("%s", s->_opcodes[opcode].name.c_str()); + sciprintf("%s", opcode < s->_opcodes.size() ? s->_opcodes[opcode].name.c_str() : "undefined"); i = 0; while (g_opcode_formats[opcode][i]) { -- cgit v1.2.3