From 50dc712d5e34effe22cb002205a8d7f9a8f082eb Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 21 Oct 2016 09:48:57 +0200 Subject: [PATCH] fixes #4906 --- compiler/vm.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/vm.nim b/compiler/vm.nim index b7af41a148..5a17629f54 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -900,7 +900,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = if newPc < pc: handleJmpBack() #echo "new pc ", newPc, " calling: ", prc.name.s var newFrame = PStackFrame(prc: prc, comesFrom: pc, next: tos) - newSeq(newFrame.slots, prc.offset) + newSeq(newFrame.slots, prc.offset+ord(isClosure)) if not isEmptyType(prc.typ.sons[0]) or prc.kind == skMacro: putIntoReg(newFrame.slots[0], getNullValue(prc.typ.sons[0], prc.info)) for i in 1 .. rc-1: