summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/vm.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim
index 185975ec3..ac2feac26 100644
--- a/compiler/vm.nim
+++ b/compiler/vm.nim
@@ -2078,6 +2078,7 @@ proc execute(c: PCtx, start: int): PNode =
   result = rawExecute(c, start, tos).regToNode
 
 proc execProc*(c: PCtx; sym: PSym; args: openArray[PNode]): PNode =
+  c.loopIterations = c.config.maxLoopIterationsVM
   if sym.kind in routineKinds:
     if sym.typ.len-1 != args.len:
       localError(c.config, sym.info,