Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
849 stars 194 forks source link

Simplify (x^1) != 0 #5545

Open joelreymont opened 1 month ago

joelreymont commented 1 month ago

Version and Platform (required):

Internal binary major dine favor.

In DjiAircraftInfo_GetAircraftTypeByCameraVersion...

I believe this

00047d64          if (zx.d(DjiError_IsSuccess(err_code) ^ 1) != 0)

should be written != 1 for clarity.

IDA does this

    if ( !DjiError_IsSuccess_localalias_0(err_code) )
xusheng6 commented 1 month ago

Related to https://github.com/Vector35/binaryninja-api/issues/5526 and https://github.com/Vector35/binaryninja-api/issues/5525

It might be considered a duplicate or added into #5525 as one of the cases? I am not sure