1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 17:18:07 +02:00

ensureBuffer can modify this.buffer, so read it after ensureBuffer

This commit is contained in:
Andreas Gal 2011-06-22 02:34:26 -04:00
parent e928f18736
commit 3f713de5fe

2
pdf.js
View file

@ -671,9 +671,9 @@ var PredictorStream = (function() {
var predictor = this.stream.getByte();
var rawBytes = this.stream.getBytes(rowBytes);
var buffer = this.buffer;
var bufferLength = this.bufferLength;
this.ensureBuffer(bufferLength + pixBytes);
var buffer = this.buffer;
var currentRow = buffer.subarray(bufferLength, bufferLength + rowBytes);
var prevRow = buffer.subarray(bufferLength - rowBytes, bufferLength);