diff options
| author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-04-10 11:36:41 +0200 | 
|---|---|---|
| committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:24:12 +0200 | 
| commit | 445103115a99e427be727ead070c2700ed4175d6 (patch) | |
| tree | f6c0e9913750db2031774d1b61e8e232122dc3e2 /src/core | |
| parent | f0345a6617e2458000210fb6edafccf5a04eca61 (diff) | |
Fix crash bug when unrolling in the token handler empties the parser stack
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/parser/stack/Stack.cpp | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/parser/stack/Stack.cpp b/src/core/parser/stack/Stack.cpp index 41ced2a..d37f178 100644 --- a/src/core/parser/stack/Stack.cpp +++ b/src/core/parser/stack/Stack.cpp @@ -983,7 +983,7 @@ void StackImpl::handleToken(const Token &token)  	std::vector<SyntaxDescriptor> pendingClose = pendingCloseTokens(token.id);  	// Iterate until the stack can no longer be unwound -	while (true) { +	while (!stack.empty()) {  		LoggerFork loggerFork = logger().fork();  		bool hadError = false; @@ -1032,6 +1032,9 @@ void StackImpl::handleToken(const Token &token)  			return;  		}  	} + +	// Issue an error, because the token was not handled +	strayTokenError(token, descr, logger());  }  void StackImpl::handleFieldEnd(bool endRange)  | 
