Skip to content
This repository has been archived by the owner on Apr 27, 2019. It is now read-only.

Commit

Permalink
Fix max lines being exceeded (#115)
Browse files Browse the repository at this point in the history
The max lines check at line 104 isn't sufficient because multiple lines can be parsed in one go before the next check is conducted.
  • Loading branch information
Franklin Wang authored and Mathew Kurian committed Apr 17, 2016
1 parent 6aab46d commit e99cb12
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -191,7 +191,11 @@ public boolean onMeasure(IProgress<Float> progress, ICancel<Boolean> cancelled)
// Next line
lineNumber++;

// Chcek cancelled
if (lineNumber >= params.maxLines) {
break main;
}

// Check cancelled
if (cancelled.isCancelled()) {
done = false;
break;
Expand Down Expand Up @@ -573,4 +577,4 @@ public LineAnalysis(int start, int end, float remainWidth) {
this.remainWidth = remainWidth;
}
}
}
}

0 comments on commit e99cb12

Please sign in to comment.