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

Inconsistent display of `bool` values in conditional statements

Open op2786 opened this issue 1 year ago • 1 comments

Version and Platform (required):

  • Binary Ninja Version: 4.0.4836-dev, df4290fd
  • OS: macos
  • OS Version: 14.3
  • CPU Architecture: arm64

Bug Description: It seems that BN chooses to display bool values as false or true, but it does so inconsistently. In the example below, initialized is defined as a bool. As evident in the example, BN uses true or false when assigning a value to it. However, when checking its value in if statements, it does not maintain this consistency.

Screenshots:

op2786 avatar Feb 07 '24 12:02 op2786

I suspect this is either a type propagation issue where we're not propagating the bool type to the constant, or a display issues were we're not checking the type of the constant.

plafosse avatar Feb 13 '24 14:02 plafosse