0
0
mirror of https://github.com/vim/vim.git synced 2025-08-30 20:43:35 -04:00

patch 8.2.1561: using NULL pointers in fold code

Problem:    Using NULL pointers in fold code.
Solution:   Avoid using a NULL pointer. (Dominique Pellé, closes #6831,
            closes #6831)
This commit is contained in:
Bram Moolenaar 2020-09-01 21:21:24 +02:00
parent 9c2b06637b
commit 81fcb67fb3
2 changed files with 3 additions and 1 deletions

View File

@ -3059,7 +3059,7 @@ truncate_fold(fold_T *fp, linenr_T end)
}
#define fold_end(fp) ((fp)->fd_top + (fp)->fd_len - 1)
#define valid_fold(fp, gap) ((fp) < ((fold_T *)(gap)->ga_data + (gap)->ga_len))
#define valid_fold(fp, gap) ((gap)->ga_len > 0 && (fp) < ((fold_T *)(gap)->ga_data + (gap)->ga_len))
#define fold_index(fp, gap) ((size_t)(fp - ((fold_T *)(gap)->ga_data)))
void

View File

@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1561,
/**/
1560,
/**/