summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitry Uvarov <uvarov.dl@gmail.com>2014-02-20 14:08:49 +0400
committerDmitry Uvarov <uvarov.dl@gmail.com>2014-02-20 14:08:49 +0400
commit0e6019344ea484433e40fe0225bcc10199269ef8 (patch)
tree812ded654d871277341fb4a4a84f13b8e87c4cfd /src
parentca8dce18408ed0e9249b9fe41f6b580b91109e8a (diff)
downloadetherpad-lite-0e6019344ea484433e40fe0225bcc10199269ef8.zip
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);