diff options
author | James McCoy <jamessan@jamessan.com> | 2020-09-03 22:28:27 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2020-09-04 08:25:33 -0400 |
commit | 11901922167924e95b2af7f2eab59943f6aa02a5 (patch) | |
tree | 76dffb305b4de48a5b8278b6e08d919169585c39 /src/nvim/spell.c | |
parent | ae8f10873291bd35421d5d910154d9750779747e (diff) | |
download | rneovim-11901922167924e95b2af7f2eab59943f6aa02a5.tar.gz rneovim-11901922167924e95b2af7f2eab59943f6aa02a5.tar.bz2 rneovim-11901922167924e95b2af7f2eab59943f6aa02a5.zip |
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.
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 3 |
1 files changed, 3 insertions, 0 deletions
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". |