diff options
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 10cc410e81..880c159ce7 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -5761,7 +5761,9 @@ cleanup_suggestions ( xfree(stp[i].st_word); } gap->ga_len = keep; - return stp[keep - 1].st_score; + if (keep >= 1) { + return stp[keep - 1].st_score; + } } } return maxscore; |