Correct the return values for lookChar function.
Also refactor the code slightly for an early return.
This commit is contained in:
parent
a7f7013fdc
commit
ed2368fed7
10
pdf.js
10
pdf.js
@ -1523,18 +1523,18 @@ var CCITTFaxStream = (function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
constructor.prototype.lookChar = function() {
|
constructor.prototype.lookChar = function() {
|
||||||
|
if (this.buf != EOF)
|
||||||
|
return this.buf;
|
||||||
|
|
||||||
var refLine = this.refLine;
|
var refLine = this.refLine;
|
||||||
var codingLine = this.codingLine;
|
var codingLine = this.codingLine;
|
||||||
var columns = this.columns;
|
var columns = this.columns;
|
||||||
|
|
||||||
var refPos, blackPixels, bits;
|
var refPos, blackPixels, bits;
|
||||||
|
|
||||||
if (this.buf != EOF)
|
|
||||||
return buf;
|
|
||||||
|
|
||||||
if (this.outputBits == 0) {
|
if (this.outputBits == 0) {
|
||||||
if (this.eof)
|
if (this.eof)
|
||||||
return;
|
return null;
|
||||||
|
|
||||||
this.err = false;
|
this.err = false;
|
||||||
|
|
||||||
@ -1753,7 +1753,7 @@ var CCITTFaxStream = (function() {
|
|||||||
code1 = this.lookBits(13);
|
code1 = this.lookBits(13);
|
||||||
if (code1 == EOF) {
|
if (code1 == EOF) {
|
||||||
this.eof = true;
|
this.eof = true;
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
if ((code1 >> 1) == 1) {
|
if ((code1 >> 1) == 1) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user