diff options
author | Araq <rumpf_a@web.de> | 2014-04-04 08:19:02 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-04-04 08:19:02 +0200 |
commit | 6a055990f90ef943cb8f6f0ae73c2a011009f939 (patch) | |
tree | 8981b43a02d2cbd757ed7792159851f3dba82cce /compiler/vmgen.nim | |
parent | 160933f9def1467db4449ab078d0f2d662504cc8 (diff) | |
download | Nim-6a055990f90ef943cb8f6f0ae73c2a011009f939.tar.gz |
minor VM bugfix
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r-- | compiler/vmgen.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index 85416f7bc..434cb0932 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -1034,6 +1034,7 @@ proc genAsgn(c: PCtx; dest: TDest; ri: PNode; requiresCopy: bool) = proc setSlot(c: PCtx; v: PSym) = # XXX generate type initialization here? if v.position == 0: + if c.prc.maxSlots == 0: c.prc.maxSlots = 1 v.position = c.prc.maxSlots c.prc.slots[v.position] = (inUse: true, kind: if v.kind == skLet: slotFixedLet else: slotFixedVar) |