SCI: Fix disassembly of 32-bit addresses

This commit is contained in:
Colin Snover 2017-10-04 00:25:45 -05:00
parent 5ef0b3a62a
commit 60bdb7936f

View File

@ -3625,7 +3625,7 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) {
uint opCount = 1;
bool printBWTag = false;
bool printBytes = false;
uint16 size;
uint32 size;
if (parse_reg_t(_engine->_gamestate, argv[1], &vpc, false)) {
debugPrintf("Invalid address passed.\n");
@ -3650,7 +3650,6 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) {
}
do {
// TODO: Use a true 32-bit reg_t for the position (vpc)
vpc = disassemble(_engine->_gamestate, make_reg32(vpc.getSegment(), vpc.getOffset()), nullptr, printBWTag, printBytes);
} while ((vpc.getOffset() > 0) && (vpc.getOffset() + 6 < size) && (--opCount));