From c8f497a9b3d3bc23d8d92ecb2186958155f8e13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 12 Dec 2011 19:35:25 +0100 Subject: [PATCH] Fixed #3405 ((error) Invalid number of character ({) when these macros are def ined: 'WIN32'.) --- lib/preprocessor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 72fafc155..4d4b0dbbb 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -1838,8 +1838,9 @@ std::string Preprocessor::handleIncludes(const std::string &code, const std::str indentmatch = indent; } } else if (line == "#endif") { - --indent; - if (indentmatch > indent) { + if (indent > 0) + --indent; + if (indentmatch > indent || indent == 0) { indentmatch = indent; elseIsTrue = false; suppressCurrentCodePath = false;