diff options
author | Dmitry Uvarov <uvarov.dl@gmail.com> | 2014-02-20 14:08:49 +0400 |
---|---|---|
committer | Dmitry Uvarov <uvarov.dl@gmail.com> | 2014-02-20 14:08:49 +0400 |
commit | 0e6019344ea484433e40fe0225bcc10199269ef8 (patch) | |
tree | 812ded654d871277341fb4a4a84f13b8e87c4cfd /src | |
parent | ca8dce18408ed0e9249b9fe41f6b580b91109e8a (diff) | |
download | etherpad-lite-0e6019344ea484433e40fe0225bcc10199269ef8.zip |
fix for infinite loop on bad changeset
Diffstat (limited to 'src')
-rw-r--r-- | src/static/js/Changeset.js | 2 |
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); |