Preprocessor: Fixed bug, read() didn't handle correctly string constants like this: "\""
This commit is contained in:
parent
a669d020cf
commit
345a7f2c9b
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue