diff --git a/src/Amalgam/interpreter/InterpreterOpcodesBase.cpp b/src/Amalgam/interpreter/InterpreterOpcodesBase.cpp index a3ec09a3..c7f1770e 100644 --- a/src/Amalgam/interpreter/InterpreterOpcodesBase.cpp +++ b/src/Amalgam/interpreter/InterpreterOpcodesBase.cpp @@ -574,7 +574,9 @@ EvaluableNodeReference Interpreter::InterpretNode_ENT_WHILE(EvaluableNode *en, b if(!condition_true) break; - if(AreExecutionResourcesExhausted()) + //count an extra cycle for each loop + //this ensures that even if all of the nodes are immediate, it'll still count the performance + if(AreExecutionResourcesExhausted(true)) return EvaluableNodeReference::Null(); SetTopPreviousResultInConstructionStack(previous_result);