X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=correct.c;h=b2e9c69a708bfba016e777a39b82e07fcaa05e61;hp=d144c31baab8afdcb1f22a2830ce46ec614ee0c1;hb=18b9473cf823e9e69f0557f125ac5d255236a899;hpb=d97e032fcfe6e1c1a080aa66f435426330e8585e diff --git a/correct.c b/correct.c index d144c31..b2e9c69 100644 --- a/correct.c +++ b/correct.c @@ -356,11 +356,12 @@ char *correct_str(ht table, const char *ident) { if (correct_find(table, ident)) return found; - mem_d(found); + /*mem_d(found);*/ if ((e1rows = correct_size(ident))) { e1 = correct_edit(ident); if ((e1ident = correct_maximum(table, e1, e1rows))) { + mem_d(found); found = util_strdup(e1ident); correct_cleanup(e1, e1rows); return found; @@ -368,8 +369,10 @@ char *correct_str(ht table, const char *ident) { } e2 = correct_known(table, e1, e1rows, &e2rows); - if (e2rows && ((e2ident = correct_maximum(table, e2, e2rows)))) + if (e2rows && ((e2ident = correct_maximum(table, e2, e2rows)))) { + mem_d(found); found = util_strdup(e2ident); + } correct_cleanup(e1, e1rows); correct_cleanup(e2, e2rows);