Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Reduce length of haystack before re-searching for needle #276

Merged
merged 1 commit into from
Apr 27, 2016

Conversation

hobochili
Copy link

Fix for issue #275

When only the first letter of the needle is found in the haystack but the rest of the string doesn't match, the strfaststr function loops back and looks for another occurrence of the first letter of the needle. When it does this, it needs to shrink the haystack to avoid searching beyond the original haystack boundary.

@buixor
Copy link
Contributor

buixor commented Apr 27, 2016

Nice one, thanks :)

@buixor buixor merged commit 06c2828 into nbs-system:master Apr 27, 2016
@hobochili hobochili deleted the faster-stronger-harder-bug branch August 16, 2017 15:31
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants