Merge pull request #4011 from Rob--W/issue-3885
Set eof to true at the end of a FlateStream
This commit is contained in:
commit
2e7c71c75e
@ -508,6 +508,11 @@ var FlateStream = (function FlateStreamClosure() {
|
|||||||
var buffer = this.ensureBuffer(bufferLength + blockLen);
|
var buffer = this.ensureBuffer(bufferLength + blockLen);
|
||||||
var end = bufferLength + blockLen;
|
var end = bufferLength + blockLen;
|
||||||
this.bufferLength = end;
|
this.bufferLength = end;
|
||||||
|
if (blockLen === 0) {
|
||||||
|
if (typeof bytes[bytesPos] == 'undefined') {
|
||||||
|
this.eof = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
for (var n = bufferLength; n < end; ++n) {
|
for (var n = bufferLength; n < end; ++n) {
|
||||||
if (typeof (b = bytes[bytesPos++]) == 'undefined') {
|
if (typeof (b = bytes[bytesPos++]) == 'undefined') {
|
||||||
this.eof = true;
|
this.eof = true;
|
||||||
@ -515,6 +520,7 @@ var FlateStream = (function FlateStreamClosure() {
|
|||||||
}
|
}
|
||||||
buffer[n] = b;
|
buffer[n] = b;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.bytesPos = bytesPos;
|
this.bytesPos = bytesPos;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -62,3 +62,4 @@
|
|||||||
!issue3371.pdf
|
!issue3371.pdf
|
||||||
!issue2956.pdf
|
!issue2956.pdf
|
||||||
!bug946506.pdf
|
!bug946506.pdf
|
||||||
|
!issue3885.pdf
|
||||||
|
BIN
test/pdfs/issue3885.pdf
Normal file
BIN
test/pdfs/issue3885.pdf
Normal file
Binary file not shown.
@ -61,6 +61,14 @@
|
|||||||
"lastPage": 2,
|
"lastPage": 2,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "issue3885",
|
||||||
|
"file": "pdfs/issue3885.pdf",
|
||||||
|
"md5": "319c998910453bc44d40c7748cd2cb79",
|
||||||
|
"rounds": 1,
|
||||||
|
"firstPage": 1,
|
||||||
|
"lastPage": 1,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "issue2833",
|
{ "id": "issue2833",
|
||||||
"file": "pdfs/issue2833.pdf",
|
"file": "pdfs/issue2833.pdf",
|
||||||
"md5": "7bc6e17c41586155c188d7408bcb9ab5",
|
"md5": "7bc6e17c41586155c188d7408bcb9ab5",
|
||||||
|
Loading…
Reference in New Issue
Block a user