SCI: Fix sign in disasm of relative jumps
This commit is contained in:
parent
50176e7c5f
commit
4296ac6d15
1 changed files with 8 additions and 6 deletions
|
@ -174,13 +174,15 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode
|
|||
break;
|
||||
|
||||
case Script_SRelative:
|
||||
if (opsize)
|
||||
param_value = scr[retval.offset++];
|
||||
else {
|
||||
param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.offset]);
|
||||
retval.offset += 2;
|
||||
if (opsize) {
|
||||
int8 offset = (int8)scr[retval.offset++];
|
||||
debugN(" %02x [%04x]", 0xff & offset, 0xffff & (retval.offset + offset));
|
||||
}
|
||||
else {
|
||||
int16 offset = (int16)READ_SCI11ENDIAN_UINT16(&scr[retval.offset]);
|
||||
retval.offset += 2;
|
||||
debugN(" %04x [%04x]", 0xffff & offset, 0xffff & (retval.offset + offset));
|
||||
}
|
||||
debugN(opsize ? " %02x [%04x]" : " %04x [%04x]", param_value, (0xffff) & (retval.offset + param_value));
|
||||
break;
|
||||
|
||||
case Script_End:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue