diff options
Diffstat (limited to 'src/typo.c')
-rw-r--r-- | src/typo.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2,6 +2,7 @@ // SPDX-License-Identifier: 0BSD #include "typo.h" + #include <limits.h> #include <stdint.h> #include <stdlib.h> @@ -125,7 +126,7 @@ int typo_distance(const char *actual, const char *expected) { // This is the Wagner-Fischer algorithm for Levenshtein distance, using // Manhattan distance on the keyboard for individual characters. - const int insert_cost = (40 + 12 + 1) / 2; + const int insert_cost = 12; size_t rows = strlen(actual) + 1; size_t cols = strlen(expected) + 1; |