1
0

Revert "fix input text matching"

This reverts commit a69a065b02.

Using strncmp with the length of the user input turns it into a prefix
match rather than an exact match as it's supposed to be.
This commit is contained in:
Andrew Gregory 2016-12-07 09:45:01 -05:00 committed by Hiltjo Posthuma
parent 2340d5c41f
commit 7a5a9a64fb

View File

@ -228,7 +228,7 @@ match(void)
len = tokc ? strlen(tokv[0]) : 0; len = tokc ? strlen(tokv[0]) : 0;
matches = lprefix = lsubstr = matchend = prefixend = substrend = NULL; matches = lprefix = lsubstr = matchend = prefixend = substrend = NULL;
textsize = strlen(text); textsize = strlen(text) + 1;
for (item = items; item && item->text; item++) { for (item = items; item && item->text; item++) {
for (i = 0; i < tokc; i++) for (i = 0; i < tokc; i++)
if (!fstrstr(item->text, tokv[i])) if (!fstrstr(item->text, tokv[i]))