Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libromdata] AmiiboData: Restore the full binary search for the chara…
…cter variant ID check. The issue was that we weren't immediately returning `false` if the character ID was *greater* than the expected character ID. This caused a broken ordering, which triggered the libstdc++ assertion in debug mode. Hence, if `key1.char_id > key2.char_id`, we shouldn't even bother checing the character variant ID, since we know key2 will effectively be "greater than" key1 regardless. Remember: C++ binary search functions return true if `a < b`, whereas C binary search functions return an strcmp()-like value. (-1, 0, 1) RomHeaderTest now passes all (re-generated) Amiibo tests with no errors.
- Loading branch information