comparison src/spellsuggest.c @ 22021:514d622473af v8.2.1560

patch 8.2.1560: using NULL pointers in some code Commit: https://github.com/vim/vim/commit/9c2b06637b32742cac11bfd66b1a4e84583c6c2e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 1 19:56:15 2020 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Tue, 01 Sep 2020 20:00:03 +0200
parents 47978b89a02e
children 2d6d70a913c1
comparison
equal deleted inserted replaced
22020:8449d4a87818 22021:514d622473af
3604 int i; 3604 int i;
3605 char_u longword[MAXWLEN + 1]; 3605 char_u longword[MAXWLEN + 1];
3606 int len; 3606 int len;
3607 hlf_T attr; 3607 hlf_T attr;
3608 3608
3609 if (gap->ga_len == 0)
3610 return;
3609 stp = &SUG(*gap, 0); 3611 stp = &SUG(*gap, 0);
3610 for (i = gap->ga_len - 1; i >= 0; --i) 3612 for (i = gap->ga_len - 1; i >= 0; --i)
3611 { 3613 {
3612 // Need to append what follows to check for "the the". 3614 // Need to append what follows to check for "the the".
3613 vim_strncpy(longword, stp[i].st_word, MAXWLEN); 3615 vim_strncpy(longword, stp[i].st_word, MAXWLEN);