forked from qt-creator/qt-creator
fix $$split()'s argument check
Change-Id: I2cd6dc1ad571497f540360d17dadd5e4b300ef4a Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -311,7 +311,7 @@ ProStringList QMakeEvaluator::evaluateExpandFunction(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case E_SPLIT:
|
case E_SPLIT:
|
||||||
if (args.count() != 2) {
|
if (args.count() < 1 || args.count() > 2) {
|
||||||
evalError(fL1S("split(var, sep) requires one or two arguments"));
|
evalError(fL1S("split(var, sep) requires one or two arguments"));
|
||||||
} else {
|
} else {
|
||||||
const QString &sep = (args.count() == 2) ? args.at(1).toQString(m_tmp1) : statics.field_sep;
|
const QString &sep = (args.count() == 2) ? args.at(1).toQString(m_tmp1) : statics.field_sep;
|
||||||
|
|||||||
Reference in New Issue
Block a user