Skip to content

Commit

Permalink
converting currentIndex to integer the right way
Browse files Browse the repository at this point in the history
  • Loading branch information
gniezen committed Dec 18, 2015
1 parent abb0b09 commit 8443e39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/drivers/tandemDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ module.exports = function (config) {
debug('oldest event seq: ', start_seq);
}
minIndex = start_seq;
currentIndex = (minIndex + maxIndex) / 2 | 0;
currentIndex = Math.floor( (minIndex + maxIndex) / 2);
tandemCommandResponse(COMMANDS.LOG_ENTRY_SEQ_REQ, [currentIndex], binarySearch);
}

Expand All @@ -1261,7 +1261,7 @@ module.exports = function (config) {
data.start_seq = currentIndex;
tandemFetchEventRange(progress, data, callback);
}
currentIndex = (minIndex + maxIndex) / 2 | 0;
currentIndex = Math.floor( (minIndex + maxIndex) / 2 );
if (currentIndex < start_seq) {
currentIndex = start_seq;
}
Expand Down

0 comments on commit 8443e39

Please sign in to comment.