Fixes macros.len crashing on nodes which lack the sons field.

This commit is contained in:
Dominik Picheta
2014-02-11 23:50:09 +00:00
parent a158053ae9
commit 02cf019ab6

View File

@@ -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: