diff --git a/out_of_tree/parsed_notifications.zip b/out_of_tree/parsed_notifications.zip index 159c463..505f4a9 100644 Binary files a/out_of_tree/parsed_notifications.zip and b/out_of_tree/parsed_notifications.zip differ diff --git a/pywraps/py_idaapi.py b/pywraps/py_idaapi.py index 1c6d896..447308d 100644 --- a/pywraps/py_idaapi.py +++ b/pywraps/py_idaapi.py @@ -342,7 +342,7 @@ def as_uint32(v): # ----------------------------------------------------------------------- def as_int32(v): """Returns a number as a signed int32 number""" - return -((~v & 0xffffffff)+1) + return as_signed(v, 32) # ----------------------------------------------------------------------- def as_signed(v, nbits = 32): @@ -350,7 +350,7 @@ def as_signed(v, nbits = 32): Returns a number as signed. The number of bits are specified by the user. The MSB holds the sign. """ - return -(( ~v & ((1 << nbits)-1) ) + 1) if v & (1 << nbits-1) else v + return -(( ~v & ((1 << nbits)-1) ) + 1) if v & (1 << nbits-1) else v & ((1 << nbits)-1) # ---------------------------------------------------------------------- def TRUNC(ea):