Bugfix: (E)IP-relative offsets depend on operand, not address, size.

This commit is contained in:
Ulrich Weigand 1999-09-19 12:10:03 +00:00 committed by Alexandre Julliard
parent 8388f67523
commit 233cb06fd0
1 changed files with 4 additions and 4 deletions

View File

@ -1552,17 +1552,17 @@ void DEBUG_Disasm( DBG_ADDR *addr, int display )
break; break;
} }
if (short_addr) { if (size == WORD) {
/* offset only affects low 16 bits */ /* offset only affects low 16 bits */
displ = (addr->off & 0xffff0000) displ = (addr->off & 0xffff0000)
| ((addr->off + displ) & 0xffff); | ((addr->off + displ) & 0xffff);
} }
else displ += addr->off; else displ += addr->off;
db_task_printsym(displ, short_addr ? WORD : LONG); db_task_printsym(displ, size);
break; break;
case Dl: case Dl:
if (short_addr) { if (size == WORD) {
get_value_inc(displ, addr, 2, TRUE); get_value_inc(displ, addr, 2, TRUE);
/* offset only affects low 16 bits */ /* offset only affects low 16 bits */
displ = (addr->off & 0xffff0000) displ = (addr->off & 0xffff0000)
@ -1576,7 +1576,7 @@ void DEBUG_Disasm( DBG_ADDR *addr, int display )
{ {
break; break;
} }
db_task_printsym( displ, short_addr ? WORD : LONG); db_task_printsym( displ, size );
break; break;
case o1: case o1: