Fix correctness of string search

The lookup for the skip value needs to be based upon the lowercase version of
the current byte.
This commit is contained in:
Mathias Gumz 2015-01-28 21:42:05 +01:00
parent 77f0963d00
commit 876500a259

View file

@ -118,7 +118,7 @@ size_t search_string(const std::string& text, const std::string& pattern) {
return t+p;
}
}
t += skip[text[t+p]];
t += skip[std::tolower(text[t+p])];
}
return std::string::npos;