Preprocessor: made sure string::iterator is valid after string::erase

This commit is contained in:
Daniel Marjamäki 2011-03-07 22:00:30 +01:00
parent 06abaf95a5
commit a177fc4b24
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ static bool isFallThroughComment(std::string comment)
for (std::string::iterator i = comment.begin(); i != comment.end();)
{
if (::isspace(static_cast<unsigned char>(*i)))
comment.erase(i);
i = comment.erase(i);
else
++i;
}