summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/parser/utils/SourceOffsetVector.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/parser/utils/SourceOffsetVector.hpp b/src/core/parser/utils/SourceOffsetVector.hpp
index aaebe7d..67bacef 100644
--- a/src/core/parser/utils/SourceOffsetVector.hpp
+++ b/src/core/parser/utils/SourceOffsetVector.hpp
@@ -170,6 +170,11 @@ public:
if (length < size()) {
lens.resize(length);
offsets.resize((length >> LOG2_OFFSET_INTERVAL) + 1);
+ if (length > 0) {
+ lastEnd = loadOffset(length - 1).second;
+ } else {
+ lastEnd = 0;
+ }
}
}