rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit 7d179ce096c89963deae835327596de435e66cdf
parent 5b624196125034b95d504be682127a5964e08da5
Author: Toby Goodwin <toby@paccrat.org>
Date:   Fri,  2 Mar 2018 06:06:51 +0000

nBody second child can be null

Diffstat:
Mtree.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tree.c b/tree.c @@ -60,8 +60,7 @@ extern Node *mk(int /*nodetype*/ t,...) { break; } n->type = t; - if (t == nBody && - n->u[1].p->type == nIfnot) { + if (t == nBody && n->u[1].p && n->u[1].p->type == nIfnot) { if (n->u[0].p->type == nIf) { fprint(2, "here i am!\n"); } else