diff --git a/preprocessor.cpp b/preprocessor.cpp index b87030dcf..dece75386 100644 --- a/preprocessor.cpp +++ b/preprocessor.cpp @@ -113,7 +113,10 @@ std::string Preprocessor::read(std::istream &istr, const std::string &filename) if ( ch == '\\' ) { ch = (char)istr.get(); - code << std::string(1,ch); + code << std::string(1,ch); + + // Avoid exiting loop if string contains "-characters + ch = 0; } } while ( istr.good() && ch != '\"' ); } @@ -139,7 +142,7 @@ std::string Preprocessor::read(std::istream &istr, const std::string &filename) code << std::string(1, ch); } } - + return code.str(); }