summaryrefslogtreecommitdiff
path: root/src/spellfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/spellfile.c')
-rw-r--r--src/spellfile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/spellfile.c b/src/spellfile.c
index 370e80b81..ad0d00021 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -6256,6 +6256,8 @@ spell_add_word(
{
fpos = fpos_next;
fpos_next = ftell(fd);
+ if (fpos_next < 0)
+ break; // should never happen
if (STRNCMP(word, line, len) == 0
&& (line[len] == '/' || line[len] < ' '))
{