summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2014-08-30 19:31:16 -0700
committerJohn Hawthorn <john.hawthorn@gmail.com>2014-08-30 19:48:29 -0700
commit02b6232f7fdc780868481b101ddea1cd7968bb56 (patch)
treee77990d7b508813ce8d320ff84fe3c1208da33c4 /match.c
parent5c4ad167f745d4351e7ce5419f80ed14393ff52b (diff)
We can use D[][] to test if there was a match
Diffstat (limited to 'match.c')
-rw-r--r--match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/match.c b/match.c
index a50aab3..ea73e8f 100644
--- a/match.c
+++ b/match.c
@@ -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;
}