diff --git a/preprocessor.cpp b/preprocessor.cpp index e407ac63b..1d91b861a 100644 --- a/preprocessor.cpp +++ b/preprocessor.cpp @@ -146,17 +146,26 @@ void Preprocessor::preprocess(std::istream &istr, std::map 0 ) + --loc; + } // Using the backslash at the end of a line.. while ( (loc = codestr.rfind("\\\n")) != std::string::npos ) diff --git a/testpreprocessor.cpp b/testpreprocessor.cpp index 27ae4ec4b..3a7e5243c 100644 --- a/testpreprocessor.cpp +++ b/testpreprocessor.cpp @@ -152,9 +152,9 @@ private: { const char filedata[] = "#ifdef WIN32 \n" " abcdef\n" - "#else\n" + "#else \n" " qwerty\n" - "#endif\n"; + "#endif \n"; // Expected result.. std::map expected; @@ -224,7 +224,7 @@ private: { const char filedata[] = "#ifdef ABC\n" "A\n" - "#endif\n" + "#endif\t\n" "#ifdef ABC\n" "A\n" "#endif\n";