Commits

Anonymous committed eaaef1f

Fixed bug with disp8/disp32 in operand decoder - should be signed

  • Participants
  • Parent commits fac6dcb

Comments (0)

Files changed (1)

File C/OperandDecoder.c

     };
 } registers_t;
 
-#define disp32(pointer)   (*((unsigned int*)  (pointer)))
-#define disp8(pointer)    (*((unsigned char*) (pointer)))
+#define disp32(pointer)   (*((signed int*)  (pointer)))
+#define disp8(pointer)    (*((signed char*) (pointer)))
 
 inline operandspec_t decodeOperands(registers_t* regs, unsigned char* modRM)
 {
     operandspec_t decoded;
     unsigned char mod,reg,rm,scale,index,base;
-    unsigned char* origmodrm;
-
     register unsigned int effadd;
 
     mod = (*modRM       ) >> 6;