tidied up env suggestions

This commit is contained in:
Dominik Maier
2021-02-24 18:07:08 +01:00
parent 564f491566
commit cc7c651dc9
2 changed files with 6 additions and 1 deletions

View File

@ -529,6 +529,8 @@ static int string_distance_levenshtein(char *s1, char *s2) {
s1len = strlen(s1);
s2len = strlen(s2);
unsigned int column[s1len + 1];
column[s1len] = 1;
for (y = 1; y <= s1len; y++)
column[y] = y;
for (x = 1; x <= s2len; x++) {
@ -608,6 +610,8 @@ void print_suggested_envs(char *mispelled_env) {
};
ck_free(reduced);
}
if (found) goto cleanup;