mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 02:12:11 +00:00
Fixes macros.len crashing on nodes which lack the sons field.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user