changeset 11234:8c153d400bf4 v8.0.0503

patch 8.0.0503: endless loop in updating folds with 32 bit ints commit https://github.com/vim/vim/commit/9d20ce6970158de69202a82529d9e97827a9e71b Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 23 21:53:35 2017 +0100 patch 8.0.0503: endless loop in updating folds with 32 bit ints Problem: Endless loop in updating folds with 32 bit ints. Solution: Subtract from LHS instead of add to the RHS. (Matthew Malcomson)
author Christian Brabandt <cb@256bit.org>
date Thu, 23 Mar 2017 22:00:04 +0100
parents d6bf6847abad
children 9b7de4c4fd04
files src/fold.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/fold.c
+++ b/src/fold.c
@@ -2755,7 +2755,7 @@ foldUpdateIEMSRecurse(
 	/* End of fold found, update the length when it got shorter. */
 	if (fp->fd_len != flp->lnum - fp->fd_top)
 	{
-	    if (fp->fd_top + fp->fd_len > bot + 1)
+	    if (fp->fd_top + fp->fd_len - 1 > bot)
 	    {
 		/* fold continued below bot */
 		if (getlevel == foldlevelMarker
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    503,
+/**/
     502,
 /**/
     501,