From 2f32965bdfd9838d01b35d2c3e506eea3c291bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 5 Nov 2011 19:59:48 +0100 Subject: [PATCH] Token: assert that multicompare patterns don't begin with some %% command --- lib/token.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/token.cpp b/lib/token.cpp index 71f7e5d0c..2db876e9b 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -602,6 +602,9 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid) if (!patternUnderstood) { return false; } + + // debugging: assert that this is not part of a multicompare pattern.. + assert(*p != '|'); tok = tok->next(); continue;