summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-28 15:46:55 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-28 15:46:55 +0100
commitc18790f70beb5f52b00bc1c2b1ded2b252f1998a (patch)
treed01ce05edb4648d6c3ab77db5317538b92904557
parent12e10d18810b7ea4ce142d76e846b4faf0c33488 (diff)
Fixed potential problem in SourceOffsetVector
-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;
+ }
}
}