Patch 8.2.1561
Problem:    Using NULL pointers in fold code.
Solution:   Avoid using a NULL pointer. (Dominique Pellé, closes #6831,
            closes #6831)
Files:      src/fold.c


*** ../vim-8.2.1560/src/fold.c  2020-09-01 19:56:10.928571016 +0200
--- src/fold.c  2020-09-01 21:12:16.267563378 +0200
***************
*** 3059,3065 ****
  }
  
  #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 fold_index(fp, gap) ((size_t)(fp - ((fold_T *)(gap)->ga_data)))
  
      void
--- 3059,3065 ----
  }
  
  #define fold_end(fp) ((fp)->fd_top + (fp)->fd_len - 1)
! #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
*** ../vim-8.2.1560/src/version.c       2020-09-01 19:56:10.928571016 +0200
--- src/version.c       2020-09-01 21:19:42.146168980 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1561,
  /**/

-- 
FATHER:    Who are you?
PRINCE:    I'm ... your son ...
FATHER:    Not you.
LAUNCELOT: I'm ... er ... Sir Launcelot, sir.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202009011922.081JM3Df3396006%40masaka.moolenaar.net.

Raspunde prin e-mail lui