summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-03-13 14:39:19 +0000
committerJohn McLear <john@mclear.co.uk>2014-03-13 14:39:19 +0000
commitcc03f5374cb1027b60a5cd09d9223f68b12ba50c (patch)
treee73afdad8cb935275caefedfaacdc798a880f657 /src
parente12093eb196a1b61553d15ca434a24459f947f25 (diff)
parent0e6019344ea484433e40fe0225bcc10199269ef8 (diff)
downloadetherpad-lite-cc03f5374cb1027b60a5cd09d9223f68b12ba50c.zip
Merge pull request #2089 from dmitryuv/changesetslib-fixes
fix for infinite loop on bad changeset
Diffstat (limited to 'src')
-rw-r--r--src/static/js/Changeset.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js
index e47b3052..355bef4a 100644
--- a/src/static/js/Changeset.js
+++ b/src/static/js/Changeset.js
@@ -1867,7 +1867,7 @@ exports.inverse = function (cs, lines, alines, pool) {
curLineOpIterLine = curLine;
var indexIntoLine = 0;
var done = false;
- while (!done) {
+ while (!done && curLineOpIter.hasNext()) {
curLineOpIter.next(curLineNextOp);
if (indexIntoLine + curLineNextOp.chars >= curChar) {
curLineNextOp.chars -= (curChar - indexIntoLine);