Commit 7393a038686ceb96461afe5d8ffa901a286baee6

Authored by Jay Berkenbilt
1 parent 478c05fc

Update lastOffset when reading

Showing 1 changed file with 3 additions and 1 deletions
libqpdf/OffsetInputSource.cc
... ... @@ -51,7 +51,9 @@ OffsetInputSource::rewind()
51 51 size_t
52 52 OffsetInputSource::read(char* buffer, size_t length)
53 53 {
54   - return this->proxied->read(buffer, length);
  54 + size_t result = this->proxied->read(buffer, length);
  55 + this->setLastOffset(this->proxied->getLastOffset() - global_offset);
  56 + return result;
55 57 }
56 58  
57 59 void
... ...