morenice / ahocorasick

C implementation Aho-Corasick string matching
MIT License
23 stars 7 forks source link

Missing matching texts #7

Closed jmkok closed 4 years ago

jmkok commented 4 years ago

The engine does not locate all texts: in sample_code(): If you add: aho_add_match_text(&aho, "b", 1); The text "b" will not be located.

It seems the code will return only return one result for each last matching letter

Additional example: aho_add_match_text(&aho, "dab", 3); The code wil not return a match for "ab" anymore

jmkok commented 4 years ago

Added a pull request which fixes this issue