preprocessor: Fixed hanging in Preprocessor::expandMacros when trying to replace all '__VA_ARGS__' with '__VA_ARGS__'
This commit is contained in:
parent
74699cab66
commit
f0afdf3582
|
@ -1077,10 +1077,12 @@ public:
|
||||||
if ((pos = macrocode.find_first_of("\r\n")) != std::string::npos)
|
if ((pos = macrocode.find_first_of("\r\n")) != std::string::npos)
|
||||||
macrocode.erase(pos);
|
macrocode.erase(pos);
|
||||||
// Replace "__VA_ARGS__" with parameters
|
// Replace "__VA_ARGS__" with parameters
|
||||||
while ((pos = macrocode.find("__VA_ARGS__")) != std::string::npos)
|
pos = 0;
|
||||||
|
while ((pos = macrocode.find("__VA_ARGS__", pos)) != std::string::npos)
|
||||||
{
|
{
|
||||||
macrocode.erase(pos, 11);
|
macrocode.erase(pos, 11);
|
||||||
macrocode.insert(pos, s);
|
macrocode.insert(pos, s);
|
||||||
|
pos += s.length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue