Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
brammool committed Mar 23, 2017
1 parent a37ffaa commit 9d20ce6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/fold.c
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -764,6 +764,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
503,
/**/
502,
/**/
Expand Down

0 comments on commit 9d20ce6

Please sign in to comment.