summaryrefslogtreecommitdiff
path: root/libs/protoutil/src/ProtoFileReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/protoutil/src/ProtoFileReader.cpp')
-rw-r--r--libs/protoutil/src/ProtoFileReader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/protoutil/src/ProtoFileReader.cpp b/libs/protoutil/src/ProtoFileReader.cpp
index bbb1fe374f0e..c7f1129fbbaa 100644
--- a/libs/protoutil/src/ProtoFileReader.cpp
+++ b/libs/protoutil/src/ProtoFileReader.cpp
@@ -99,6 +99,7 @@ ProtoFileReader::next()
// Shouldn't get to here. Always call hasNext() before calling next().
return 0;
}
+ mPos++;
return mBuffer[mOffset++];
}
@@ -130,6 +131,7 @@ ProtoFileReader::move(size_t amt)
const size_t chunk =
mMaxOffset - mOffset > amt ? amt : mMaxOffset - mOffset;
mOffset += chunk;
+ mPos += chunk;
amt -= chunk;
}
}