Fixed bug in like clause matching

This commit is contained in:
Mark Riddoch
2015-02-20 12:36:24 +00:00
parent a022775342
commit 7d07e5dd8a

View File

@ -762,7 +762,8 @@ extern char *strcasestr();
char *portion = malloc(len + 1);
int rval;
strncpy(portion, fixed, len - trailing);
rval = (strcasestr(portion, str) != NULL ? 0 : 1);
portion[len - trailing] = 0;
rval = (strcasestr(str, portion) != NULL ? 0 : 1);
free(portion);
return rval;
}