commit | 9c2b06637b32742cac11bfd66b1a4e84583c6c2e | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Sep 01 19:56:15 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Sep 01 19:56:15 2020 +0200 |
tree | 6f193fe923afd59dd8ac369bd58e9ae32fc06ae2 | |
parent | ca563b9b948aec18463c26e9f87ae7933571b40e [diff] [blame] |
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.
diff --git a/src/spellsuggest.c b/src/spellsuggest.c index 0821dc6..96e7bb6 100644 --- a/src/spellsuggest.c +++ b/src/spellsuggest.c
@@ -3606,6 +3606,8 @@ int len; hlf_T attr; + if (gap->ga_len == 0) + return; stp = &SUG(*gap, 0); for (i = gap->ga_len - 1; i >= 0; --i) {