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();)
|
for (std::string::iterator i = comment.begin(); i != comment.end();)
|
||||||
{
|
{
|
||||||
if (::isspace(static_cast<unsigned char>(*i)))
|
if (::isspace(static_cast<unsigned char>(*i)))
|
||||||
comment.erase(i);
|
i = comment.erase(i);
|
||||||
else
|
else
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue