Preprocessor: made sure string::iterator is valid after string::erase
This commit is contained in:
parent
06abaf95a5
commit
a177fc4b24
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue