Commit 56e97c1e authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

make infinite loop protection work even without an iterator variable



... (which is the usual case).

Change-Id: I464b6b284f963df45c7340ed079d540b528136f0
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
(cherry picked from qtbase/bd19870b81cee218e67feee4d5c4a46143334365)
parent 36a8d8dc
......@@ -799,8 +799,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProLoop(
forever {
if (infinite) {
if (!variable.isEmpty())
m_valuemapStack.top()[variable] = ProStringList(ProString(QString::number(index++)));
if (index > 1000) {
m_valuemapStack.top()[variable] = ProStringList(ProString(QString::number(index)));
if (++index > 1000) {
evalError(fL1S("Ran into infinite loop (> 1000 iterations)."));
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment