Fixed #2326 (Preprocessor: inline-suppr does not work for id=missingInclude)

This commit is contained in:
Daniel Marjamäki 2010-12-26 11:14:57 +01:00
parent 7943d8ce53
commit 4fd8d2e056
1 changed files with 1 additions and 2 deletions

View File

@ -1588,7 +1588,7 @@ void Preprocessor::handleIncludes(std::string &code,
// Determine line number of include // Determine line number of include
unsigned int linenr = 1; unsigned int linenr = 1;
unsigned int level = 0; 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') if (level == 0 && code[pos-p] == '\n')
++linenr; ++linenr;
@ -1600,7 +1600,6 @@ void Preprocessor::handleIncludes(std::string &code,
{ {
if (level == 0) if (level == 0)
{ {
--linenr;
break; break;
} }
--level; --level;