From e67e8519a388594e98f94d5c8d5c3e7a36086d00 Mon Sep 17 00:00:00 2001 From: Ben Bluemel Date: Fri, 5 Aug 2011 23:54:55 +0100 Subject: Fix to check for other.states.empty() when Merging SparseStates. --- lexlib/SparseState.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lexlib') diff --git a/lexlib/SparseState.h b/lexlib/SparseState.h index 655d7429c..08ff104d3 100644 --- a/lexlib/SparseState.h +++ b/lexlib/SparseState.h @@ -92,7 +92,7 @@ public: changed = true; } typename stateVector::const_iterator startOther = other.states.begin(); - if (!states.empty() && states.back().value == startOther->value) + if (!states.empty() && !other.states.empty() && states.back().value == startOther->value) ++startOther; if (startOther != other.states.end()) { states.insert(states.end(), startOther, other.states.end()); -- cgit v1.2.3