summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2013-12-14 21:06:18 +0100
committerJay Berkenbilt <ejb@ql.org>2013-12-14 21:17:07 +0100
commit7393a038686ceb96461afe5d8ffa901a286baee6 (patch)
treed623eff0d2a5396928b31ae2668eda1912a4b751
parent478c05fcab6cb4137b9cbaf55fdcdb6ff74107c0 (diff)
downloadqpdf-7393a038686ceb96461afe5d8ffa901a286baee6.tar.zst
Update lastOffset when reading
-rw-r--r--libqpdf/OffsetInputSource.cc4
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