Return argument for ida 9 ida_bytes.bin_search are not as documented

The documentation says this should be the matching address if the search is successful, otherwise ida_idaapi.BADADDR. But for some reason when I call this, it returns a tuple.

image

Is this a bug? It looks like the first tuple value is the hit address, no idea what the second value is. Any information to clear this up would be appreciated.

Hi,

The second value is the index of the matched pattern in the binpat vector. We’ll try to improve the documentation.
BTW, depending on your use case, find_bytes or find_string might be more suitable.

2 posts were split to a new topic: Parsing templated types