binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

FormInputField::Integer doesn't handle 0n prefix

Open CouleeApps opened this issue 9 months ago • 0 comments

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:

  1. Run this python:
fi = IntegerField('int')
get_form_input([fi], 'a')
fi.result
  1. Try to type 0n1234
  2. Observe error box
  3. Type 1234
  4. 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

CouleeApps avatar May 07 '24 19:05 CouleeApps