mirror of
https://github.com/php/php-src.git
synced 2026-04-21 23:18:13 +02:00
28c9376306
We must not assume that `usearch_last()` gives the proper result for negative offsets. Instead we'd need to continue to search backwards (`usearch_previous`) until we find a proper match. However, apparently searching backwards is broken, so we work around by searching forward from the start of the string until we pass the `offset_pos`, and then use the previous result. Closes GH-7189.