forked from qt-creator/qt-creator
fix return() sanity check
the value map stack always has at least one map on it. Change-Id: I836de07a14754b995403065443d3758bfc6a8683 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
@@ -1091,7 +1091,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
|
|||||||
// they cannot be used to terminate loops anyway.
|
// they cannot be used to terminate loops anyway.
|
||||||
if (m_cumulative)
|
if (m_cumulative)
|
||||||
return ReturnTrue;
|
return ReturnTrue;
|
||||||
if (m_valuemapStack.isEmpty()) {
|
if (m_valuemapStack.size() == 1) {
|
||||||
evalError(fL1S("unexpected return()."));
|
evalError(fL1S("unexpected return()."));
|
||||||
return ReturnFalse;
|
return ReturnFalse;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user