binaryninja-api
binaryninja-api copied to clipboard
FormInputField::Integer doesn't handle 0n prefix
Version and Platform (required):
- Binary Ninja Version: 4.1.5246-dev
- OS: macOS
- OS Version: 14
- CPU Architecture: M1
Bug Description: The FormInputField APi for Integer fields doesn't respect the 0n1234 convention binja generally uses for numbers, nor does it use hex-by-default conventions either. We should make it match the integer parsing behavior seen elsewhere in the app.
Steps To Reproduce:
- Run this python:
fi = IntegerField('int')
get_form_input([fi], 'a')
fi.result
- Try to type 0n1234
- Observe error box
- Type 1234
- Observe result is decimal 1234 and not 0x1234
Expected Behavior: I expected integer form inputs to match the rest of the product
Additional Information: Likely in mainwindow's interaction handler