used typeof b == undefined
This commit is contained in:
parent
4813415044
commit
9c01d8536a
12
pdf.js
12
pdf.js
@ -288,7 +288,7 @@ var FlateStream = (function() {
|
|||||||
|
|
||||||
while (codeSize < maxLen) {
|
while (codeSize < maxLen) {
|
||||||
var b;
|
var b;
|
||||||
if ((b = bytes[bytesPos++]) == undefined)
|
if (typeof (b = bytes[bytesPos++]) == "undefined")
|
||||||
error("Bad encoding in flate stream");
|
error("Bad encoding in flate stream");
|
||||||
codeBuf |= (b << codeSize);
|
codeBuf |= (b << codeSize);
|
||||||
codeSize += 8;
|
codeSize += 8;
|
||||||
@ -416,16 +416,16 @@ var FlateStream = (function() {
|
|||||||
|
|
||||||
var b;
|
var b;
|
||||||
if (hdr == 0) { // uncompressed block
|
if (hdr == 0) { // uncompressed block
|
||||||
if ((b = bytes[bytesPos++]) == undefined)
|
if (typeof (b = bytes[bytesPos++]) == "undefined")
|
||||||
error("Bad block header in flate stream");
|
error("Bad block header in flate stream");
|
||||||
var blockLen = b;
|
var blockLen = b;
|
||||||
if ((b = bytes[bytesPos++]) == undefined)
|
if (typeof (b = bytes[bytesPos++]) == "undefined")
|
||||||
error("Bad block header in flate stream");
|
error("Bad block header in flate stream");
|
||||||
blockLen |= (b << 8);
|
blockLen |= (b << 8);
|
||||||
if ((b = bytes[bytesPos++]) == undefined)
|
if (typeof (b = bytes[bytesPos++]) == "undefined")
|
||||||
error("Bad block header in flate stream");
|
error("Bad block header in flate stream");
|
||||||
var check = b;
|
var check = b;
|
||||||
if ((b = bytes[bytesPos++]) == undefined)
|
if (typeof (b = bytes[bytesPos++]) == "undefined")
|
||||||
error("Bad block header in flate stream");
|
error("Bad block header in flate stream");
|
||||||
check |= (b << 8);
|
check |= (b << 8);
|
||||||
if (check != (~this.blockLen & 0xffff))
|
if (check != (~this.blockLen & 0xffff))
|
||||||
@ -434,7 +434,7 @@ var FlateStream = (function() {
|
|||||||
var buffer = this.ensureBuffer(bufferLength + blockLen);
|
var buffer = this.ensureBuffer(bufferLength + blockLen);
|
||||||
this.bufferLength = bufferLength + blockLen;
|
this.bufferLength = bufferLength + blockLen;
|
||||||
for (var n = bufferLength; n < blockLen; ++n) {
|
for (var n = bufferLength; n < blockLen; ++n) {
|
||||||
if ((b = bytes[bytesPos++]) == undefined) {
|
if (typeof (b = bytes[bytesPos++]) == "undefined") {
|
||||||
this.eof = true;
|
this.eof = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user