Browse Source

Update libdis.h

Fixed negative address getting.
Lab 313 3 years ago
parent
commit
19191876e2
1 changed files with 4 additions and 1 deletions
  1. 4 1
      3rd_party/libdisasm/libdis.h

+ 4 - 1
3rd_party/libdisasm/libdis.h

@@ -317,7 +317,10 @@ struct x86_op_t{
             case op_offset:
                 return data.offset;
             case op_relative_far:
-                return (int32_t) data.relative_far;
+                if (data.relative_far & 0x8000)
+                        return (data.relative_far & 0xFFFF) | 0xFFFF0000;
+		else
+			return (int32_t)data.relative_far;
             default:
                 assert(false);
                 break;