Skip to content

Commit

Permalink
Fix jump addresses in casetbl disassembly
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeex committed Aug 30, 2014
1 parent 5ea9b1f commit e0a61e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/compiler/pawndisasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ cell casetbl(FILE *ftxt,const cell *params,cell opcode,cell cip)

print_opcode(ftxt,opcode,cip);
num=params[0]+1;
fprintf(ftxt,"%08lx %08lx\n",params[0],params[1]+cip+sizeof(cell));
fprintf(ftxt,"%08lx %08lx\n",params[0],params[1]);
for (idx=1; idx<num; idx++)
fprintf(ftxt," %08lx %08lx\n",params[2*idx],params[2*idx+1]+cip+(2*idx+1)*sizeof(cell));
fprintf(ftxt," %08lx %08lx\n",params[2*idx],params[2*idx+1]);
return 2*num+1;
}

Expand Down

0 comments on commit e0a61e5

Please sign in to comment.