diff --git a/pdf.js b/pdf.js index cdc8b6665..c6f9f06e7 100644 --- a/pdf.js +++ b/pdf.js @@ -329,7 +329,7 @@ var FlateStream = (function() { getBytes: function(length) { var pos = this.bufferPos; - while (!this.eof && this.bufferLength < bufferPos + length) + while (!this.eof && this.bufferLength < pos + length) this.readBlock(); var end = pos + length;