parse.y: `p->nvar` (numbered argument index list) may be `NULL`.

parent 8c7b9959
......@@ -712,9 +712,10 @@ new_cvar(parser_state *p, mrb_sym sym)
static node*
new_nvar(parser_state *p, int num)
{
int nvars = intn(p->nvars->car);
p->nvars->car = nint(nvars > num ? nvars : num);
if (p->nvars) {
int nvars = intn(p->nvars->car);
p->nvars->car = nint(nvars > num ? nvars : num);
}
return cons((node*)NODE_NVAR, nint(num));
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment