should fix the nkExprColonExpr bug in the vm

This commit is contained in:
Araq 2014-03-13 02:52:40 +01:00
commit 2fc84325c7
4 changed files with 18 additions and 11 deletions

View file

@ -426,8 +426,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
let src = regs[rb].node
if src.kind notin {nkEmpty..nkNilLit}:
let n = src.sons[rc]
regs[ra].node = if n.kind == nkExprColonExpr: n[1]
else: n
regs[ra].node = n
else:
stackTrace(c, tos, pc, errIndexOutOfBounds)
of opcWrObj: