diff --git a/src/Evaluator/Evaluator.cpp b/src/Evaluator/Evaluator.cpp index 6d30c41..a2d3b65 100644 --- a/src/Evaluator/Evaluator.cpp +++ b/src/Evaluator/Evaluator.cpp @@ -129,7 +129,7 @@ namespace Porygon::Evaluation { auto identifier = statement -> GetIdentifier(); this -> _evaluationScope -> CreateVariable(identifier, nullptr); auto block = (BoundBlockStatement*)statement -> GetBlock(); - if (step > 0){ + if (step >= 0){ for (long i = start; i <= end; i += step){ this -> _evaluationScope -> SetVariable(identifier, make_shared(i)); for (auto s: *block->GetStatements()) {