1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Fix CCITTStream regression by byte-aligning rows before checking EOL marker

This commit is contained in:
Tim van der Meij 2015-02-13 21:17:27 +01:00
parent 8614c17c1d
commit 27e3558a41
3 changed files with 12 additions and 4 deletions

View file

@ -2044,6 +2044,10 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var gotEOL = false;
if (this.byteAlign) {
this.inputBits &= ~7;
}
if (!this.eoblock && this.row === this.rows - 1) {
this.eof = true;
} else {
@ -2067,10 +2071,6 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
}
}
if (this.byteAlign && !gotEOL) {
this.inputBits &= ~7;
}
if (!this.eof && this.encoding > 0) {
this.nextLine2D = !this.lookBits(1);
this.eatBits(1);