Negative enumeration values on signed enums are returned as unsigned values when querying via the python api. #4183
Labels
Component: API
Issue needs changes to the API
Milestone
Version and Platform (required):
Bug Description:
When defining signed enums with negative values, they show up as that inside the types window. But when querying the values via the python api, one gets the 64-bit two's complement representation.
Steps To Reproduce:
Run the following script in the python console with any binary opened:
Expected Behavior:
The value returned by querying
bv.get_type_by_name("foo").members[0].value
returns -32, or at least is consistent with what's shown in the ui.Screenshots:
Additional Information:
This behavior happens the same when you define enumerations via the ui and then query via the api.
The text was updated successfully, but these errors were encountered: