From 4fd8d2e0560f6bf6dcd6f610e57e084ef36e5fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 26 Dec 2010 11:14:57 +0100 Subject: [PATCH] Fixed #2326 (Preprocessor: inline-suppr does not work for id=missingInclude) --- lib/preprocessor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 13142527a..8a127446a 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -1588,7 +1588,7 @@ void Preprocessor::handleIncludes(std::string &code, // Determine line number of include unsigned int linenr = 1; unsigned int level = 0; - for (std::string::size_type p = 0; p < pos; ++p) + for (std::string::size_type p = 1; p <= pos; ++p) { if (level == 0 && code[pos-p] == '\n') ++linenr; @@ -1600,7 +1600,6 @@ void Preprocessor::handleIncludes(std::string &code, { if (level == 0) { - --linenr; break; } --level;