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,12 +508,18 @@ var FlateStream = (function FlateStreamClosure() {
|
||||
var buffer = this.ensureBuffer(bufferLength + blockLen);
|
||||
var end = bufferLength + blockLen;
|
||||
this.bufferLength = end;
|
||||
for (var n = bufferLength; n < end; ++n) {
|
||||
if (typeof (b = bytes[bytesPos++]) == 'undefined') {
|
||||
if (blockLen === 0) {
|
||||
if (typeof bytes[bytesPos] == 'undefined') {
|
||||
this.eof = true;
|
||||
break;
|
||||
}
|
||||
buffer[n] = b;
|
||||
} else {
|
||||
for (var n = bufferLength; n < end; ++n) {
|
||||
if (typeof (b = bytes[bytesPos++]) == 'undefined') {
|
||||
this.eof = true;
|
||||
break;
|
||||
}
|
||||
buffer[n] = b;
|
||||
}
|
||||
}
|
||||
this.bytesPos = bytesPos;
|
||||
return;
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -62,3 +62,4 @@
|
||||
!issue3371.pdf
|
||||
!issue2956.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,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue3885",
|
||||
"file": "pdfs/issue3885.pdf",
|
||||
"md5": "319c998910453bc44d40c7748cd2cb79",
|
||||
"rounds": 1,
|
||||
"firstPage": 1,
|
||||
"lastPage": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue2833",
|
||||
"file": "pdfs/issue2833.pdf",
|
||||
"md5": "7bc6e17c41586155c188d7408bcb9ab5",
|
||||
|
Loading…
Reference in New Issue
Block a user