summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-01-02 14:07:22 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-01-02 19:21:21 +0100
commit5d2ce908eeda8ac4bc327393a655b2737606aceb (patch)
treedba2a24ec7f9c0b68776ad8af29a36fea569dfe2
parentf3bb4f93ebca2687e4a522767113cfb9fdb1499c (diff)
yield error on unexpected !endif directive
Change-Id: Idec7e4d0faa36b61d4b81c9fd7c4185ce4472d1b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--src/jomlib/preprocessor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jomlib/preprocessor.cpp b/src/jomlib/preprocessor.cpp
index 4688c40..a8724c0 100644
--- a/src/jomlib/preprocessor.cpp
+++ b/src/jomlib/preprocessor.cpp
@@ -364,6 +364,8 @@ void Preprocessor::enterConditional(bool followElseBranch)
void Preprocessor::exitConditional()
{
+ if (m_conditionalStack.isEmpty())
+ error(QLatin1String("unexpected ENDIF"));
m_conditionalStack.pop();
}