From c18790f70beb5f52b00bc1c2b1ded2b252f1998a Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sat, 28 Feb 2015 15:46:55 +0100 Subject: Fixed potential problem in SourceOffsetVector --- src/core/parser/utils/SourceOffsetVector.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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; + } } } -- cgit v1.2.3