| ... | ... |
@@ -155,7 +155,7 @@ double calculate_score(const char *needle, const char *haystack, size_t *positio |
| 155 | 155 |
* we encounter, the latest in the candidate |
| 156 | 156 |
* string. |
| 157 | 157 |
*/ |
| 158 |
- if(tolower(needle[i]) == tolower(haystack[j]) && D[i][j] == M[i][j]){
|
|
| 158 |
+ if(D[i][j] != SCORE_MIN && D[i][j] == M[i][j]){
|
|
| 159 | 159 |
positions[i] = j--; |
| 160 | 160 |
break; |
| 161 | 161 |
} |