From 0e6019344ea484433e40fe0225bcc10199269ef8 Mon Sep 17 00:00:00 2001 From: Dmitry Uvarov Date: Thu, 20 Feb 2014 14:08:49 +0400 Subject: [PATCH] fix for infinite loop on bad changeset --- src/static/js/Changeset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);