diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-12-14 21:06:18 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-12-14 21:17:07 +0100 |
commit | 7393a038686ceb96461afe5d8ffa901a286baee6 (patch) | |
tree | d623eff0d2a5396928b31ae2668eda1912a4b751 /libqpdf/OffsetInputSource.cc | |
parent | 478c05fcab6cb4137b9cbaf55fdcdb6ff74107c0 (diff) | |
download | qpdf-7393a038686ceb96461afe5d8ffa901a286baee6.tar.zst |
Update lastOffset when reading
Diffstat (limited to 'libqpdf/OffsetInputSource.cc')
-rw-r--r-- | libqpdf/OffsetInputSource.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libqpdf/OffsetInputSource.cc b/libqpdf/OffsetInputSource.cc index c1ec4102..2923c388 100644 --- a/libqpdf/OffsetInputSource.cc +++ b/libqpdf/OffsetInputSource.cc @@ -51,7 +51,9 @@ OffsetInputSource::rewind() size_t OffsetInputSource::read(char* buffer, size_t length) { - return this->proxied->read(buffer, length); + size_t result = this->proxied->read(buffer, length); + this->setLastOffset(this->proxied->getLastOffset() - global_offset); + return result; } void |