From 11901922167924e95b2af7f2eab59943f6aa02a5 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 3 Sep 2020 22:28:27 -0400 Subject: vim-patch:8.2.1560: using NULL pointers in some code Problem: Using NULL pointers in some code. (James McCoy) Solution: Avoid adding to a NULL pointer. Use byte as unsigned. https://github.com/vim/vim/commit/9c2b06637b32742cac11bfd66b1a4e84583c6c2e The changes to eval.c (skip_expr_concatenate) and vim9compile.c aren't included since they're specific to vim9script support. --- src/nvim/spell.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/spell.c') diff --git a/src/nvim/spell.c b/src/nvim/spell.c index ad235f1f14..05bb501fa2 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -5663,6 +5663,9 @@ check_suggestions ( int len; hlf_T attr; + if (gap->ga_len == 0) { + return; + } stp = &SUG(*gap, 0); for (int i = gap->ga_len - 1; i >= 0; --i) { // Need to append what follows to check for "the the". -- cgit