diff options
Diffstat (limited to 'src/match.c')
-rw-r--r-- | src/match.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/match.c b/src/match.c index c028b87..38b26e1 100644 --- a/src/match.c +++ b/src/match.c @@ -76,7 +76,7 @@ score_t match_positions(const char *needle, const char *haystack, size_t *positi int n = strlen(needle); int m = strlen(haystack); - if (m > MATCH_MAX_LEN || n > MATCH_MAX_LEN) { + if (m > MATCH_MAX_LEN || n > m) { /* * Unreasonably large candidate: return no score * If it is a valid match it will still be returned, it will |