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 2062a15..aa94ee6 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 {