]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
correction fix: don't try to create edits for an empty string
authorWolfgang Bumiller <blub@speed.at>
Thu, 10 Jan 2013 20:09:44 +0000 (21:09 +0100)
committerWolfgang Bumiller <blub@speed.at>
Thu, 10 Jan 2013 20:09:44 +0000 (21:09 +0100)
correct.c

index 2062a150e261945e1071c03ffdba0dc338590f43..aa94ee697081fb861f3fc438d3524f2cd0d70463 100644 (file)
--- a/correct.c
+++ b/correct.c
@@ -478,6 +478,8 @@ static char **correct_known(correction_t *corr, correct_trie_t* table, char **ar
     char **end = NULL;
 
     for (; itr < rows; itr++) {
+        if (!array[itr][0])
+            continue;
         if (vec_size(corr->edits) > itr+1)
             end = corr->edits[itr+1];
         else {