Amir Gonnen 4111f1b5f0 py/qstr: Fix hash collision corner case.
This fixes a corner case where both hash and lengths of two qstrs are
equal. In such case, if the binary search lower bound is the second
instance of the same hash, the search will miss the first instance.
To overcome this, when lower bound hash equals the requested hash, we move
the lower bound backwards to cover all previous hashes which are also equal
to the requested hash.
Also removed length comparison since it's no longer needed.

Related: https://github.com/lvgl/lv_binding_micropython/issues/224

Signed-off-by: Amir Gonnen <amirgonnen@gmail.com>
2022-08-06 02:03:33 +03:00
..
2022-07-02 23:40:22 +03:00
2022-06-17 12:57:59 +10:00
2022-07-02 23:38:13 +03:00
2019-11-21 12:04:53 +11:00