diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2014-08-30 19:31:16 -0700 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2014-08-30 19:48:29 -0700 |
commit | 02b6232f7fdc780868481b101ddea1cd7968bb56 (patch) | |
tree | e77990d7b508813ce8d320ff84fe3c1208da33c4 /match.c | |
parent | 5c4ad167f745d4351e7ce5419f80ed14393ff52b (diff) |
We can use D[][] to test if there was a match
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -155,7 +155,7 @@ double calculate_score(const char *needle, const char *haystack, size_t *positio * we encounter, the latest in the candidate * string. */ - if(tolower(needle[i]) == tolower(haystack[j]) && D[i][j] == M[i][j]){ + if(D[i][j] != SCORE_MIN && D[i][j] == M[i][j]){ positions[i] = j--; break; } |