Make zero step numerical for loop use the positive number evaluation
This commit is contained in:
parent
e472dcec1c
commit
1a84661c79
|
@ -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<IntegerEvalValue>(i));
|
||||
for (auto s: *block->GetStatements()) {
|
||||
|
|
Loading…
Reference in New Issue