1
0
mirror of https://github.com/Icinga/icinga2.git synced 2025-04-08 17:05:25 +02:00

Fix range() with negative increments

fixes 
This commit is contained in:
Jean Flach 2015-08-26 16:30:36 +02:00
parent 01ced1549a
commit 73d8ffb462

@ -227,9 +227,8 @@ Array::Ptr ScriptUtils::Range(const std::vector<Value>& arguments)
(start > end && increment >= 0))
return result;
for (double i = start; i < end; i += increment) {
for (double i = start; (increment > 0 ? i < end : i > end); i += increment)
result->Add(i);
}
return result;
}