diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2014-08-03 23:55:33 -0700 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2014-08-04 01:05:37 -0700 |
commit | 47317b330fb56374398e9ace36f7cebee2a39f90 (patch) | |
tree | b0d22b62eed6cb00ab8723dadf1993d3bb5864ea /match.c | |
parent | 0a24d45349af1f30abec2f716e65ccb411a4439c (diff) |
Only M[0][0] should default to 0
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -103,7 +103,7 @@ double calculate_score(const char *needle, const char *haystack, size_t *positio for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ - score_t score = j ? SCORE_MIN : 0; + score_t score = (j || i) ? SCORE_MIN : 0; int match = tolower(needle[i]) == tolower(haystack[j]); D[i][j] = SCORE_MIN; if(match){ |