aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2010-04-19 01:19:54 +0200
committerJay Berkenbilt <ejb@ql.org>2010-04-19 01:19:54 +0200
commitb71cef856bf666824523bed445cffdbdd0871e0f (patch)
tree80ede86b840563eddadf07df2b363eacb8ed8b07 /libqpdf
parent84353451a33171b587c0bdeaae745dbc0e553fff (diff)
downloadqpdf-b71cef856bf666824523bed445cffdbdd0871e0f.tar.zst
fix linearization padding bug for second xref stream as well as first, which was previously fixed
git-svn-id: svn+q:///qpdf/trunk@957 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/QPDFWriter.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc
index 786d4e8c..8468459c 100644
--- a/libqpdf/QPDFWriter.cc
+++ b/libqpdf/QPDFWriter.cc
@@ -2145,18 +2145,16 @@ QPDFWriter::writeLinearized()
writeXRefStream(second_half_xref,
second_half_end, second_xref_offset,
t_lin_second, 0, second_half_end,
- second_trailer_size/*,
- 0, 0, 0, 0, (pass == 1)*/);
-/// int endpos = this->pipeline->getCount();
+ second_trailer_size,
+ 0, 0, 0, 0, (pass == 1));
+ int endpos = this->pipeline->getCount();
if (pass == 1)
{
// Pad so we have enough room for the real xref
// stream. See comments for previous xref stream on
// how we calculate the padding.
-
-/// writePad(calculateXrefStreamPadding(endpos - pos));
- writePad(99);
+ writePad(calculateXrefStreamPadding(endpos - pos));
writeString("\n");
second_xref_end = this->pipeline->getCount();
}