Skip to content

Commit 9d20ce6

Browse files
committed
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)
1 parent a37ffaa commit 9d20ce6

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/fold.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2755,7 +2755,7 @@ foldUpdateIEMSRecurse(
27552755
/* End of fold found, update the length when it got shorter. */
27562756
if (fp->fd_len != flp->lnum - fp->fd_top)
27572757
{
2758-
if (fp->fd_top + fp->fd_len > bot + 1)
2758+
if (fp->fd_top + fp->fd_len - 1 > bot)
27592759
{
27602760
/* fold continued below bot */
27612761
if (getlevel == foldlevelMarker

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
503,
767769
/**/
768770
502,
769771
/**/

0 commit comments

Comments
 (0)