mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Copied entire buffer for flate stream's snarf function (since decoding looks back)
This commit is contained in:
parent
fe277b8d51
commit
a89bd1d30e
1 changed files with 3 additions and 1 deletions
4
pdf.js
4
pdf.js
|
@ -322,7 +322,9 @@ var FlateStream = (function() {
|
||||||
var bufferLength = this.bufferLength;
|
var bufferLength = this.bufferLength;
|
||||||
var bufferPos = this.bufferPos;
|
var bufferPos = this.bufferPos;
|
||||||
var n = 0;
|
var n = 0;
|
||||||
while (bufferPos < bufferLength)
|
// entire front of stream needs to be copied over since flate
|
||||||
|
// looksback when decoding
|
||||||
|
while (0 < bufferLength)
|
||||||
dest[n++] = this.buffer[bufferPos++];
|
dest[n++] = this.buffer[bufferPos++];
|
||||||
// now use dest as our buffer and fill it
|
// now use dest as our buffer and fill it
|
||||||
this.buffer = dest;
|
this.buffer = dest;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue