summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2014-02-11 23:50:09 +0000
committerDominik Picheta <dominikpicheta@googlemail.com>2014-02-11 23:50:09 +0000
commit02cf019ab63e1be23c0a4856b6591e1c41d57f4e (patch)
treeaf8a692d9c479994c556331dd78e7b409e9adbc6 /compiler
parenta158053ae9d04ebd882b2c973ddf4a3dd7d4efe8 (diff)
downloadNim-02cf019ab63e1be23c0a4856b6591e1c41d57f4e.tar.gz
Fixes macros.len crashing on nodes which lack the sons field.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/vm.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim
index 10ac7aaaf..81e712047 100644
--- a/compiler/vm.nim
+++ b/compiler/vm.nim
@@ -441,7 +441,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): PNode =
       decodeBImm(nkIntLit)
       #assert regs[rb].kind == nkBracket
       # also used by mNLen:
-      regs[ra].intVal = regs[rb].skipMeta.len - imm
+      regs[ra].intVal = regs[rb].skipMeta.safeLen - imm
     of opcLenStr:
       decodeBImm(nkIntLit)
       if regs[rb].kind == nkNilLit: