removed segfault with cap file

This commit is contained in:
Anshul Maheshwari 2015-06-19 22:59:22 +05:30
parent e01d93afa8
commit dc842b0312

View File

@ -293,6 +293,11 @@ int add_word(const char *word)
ptr_correct = (char **)realloc(spell_correct, sizeof (char *)*
spell_capacity);
}
else
{
ptr_lower = spell_lower;
ptr_correct = spell_correct;
}
size_t len = strlen(word);
new_lower = (char *)malloc(len + 1);
new_correct = (char *)malloc(len + 1);