summaryrefslogtreecommitdiffstats
path: root/src/typo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/typo.c')
-rw-r--r--src/typo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/typo.c b/src/typo.c
index cb826fc..7b359c4 100644
--- a/src/typo.c
+++ b/src/typo.c
@@ -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;