diff options
author | Marcel Klehr <mklehr@gmx.net> | 2014-03-20 21:34:01 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2014-03-20 21:34:01 +0100 |
commit | f6f319960d053b35b9c11a3d01a6a7c9bc31eef3 (patch) | |
tree | 78994922ab02f54292f4c5f36692de0a4746c16c | |
parent | ba38bc998e9ef2103e690213212151136afb0753 (diff) | |
download | etherpad-lite-f6f319960d053b35b9c11a3d01a6a7c9bc31eef3.zip |
Fix REQ_CS rev boundary check
fixes #2096
-rw-r--r-- | src/node/handler/PadMessageHandler.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index ed47109d..3582c9bd 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -1372,7 +1372,7 @@ function getChangesetInfo(padId, startNum, endNum, granularity, callback) while (compositeStart < endNum) { var compositeEnd = compositeStart + granularity; - if (compositeEnd > endNum || compositeEnd > head_revision) + if (compositeEnd > endNum || compositeEnd > head_revision+1) { break; } @@ -1500,8 +1500,8 @@ function composePadChangesets(padId, startNum, endNum, callback) var changesetsNeeded=[]; var headNum = pad.getHeadRevisionNumber(); - if (endNum > headNum) - endNum = headNum; + if (endNum > headNum+1) + endNum = headNum+1; if (startNum < 0) startNum = 0; //create a array for all changesets, we will |