Branch: Tag:

2022-05-07

2022-05-07 16:53:01 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix some NULL-derefs.

2505:    while(s->type == T_FUNCTION) {    simple_describe_type(s->car);    s = s->cdr; -  if ((s->type == T_FUNCTION) || -  ((s->type == T_MANY) && (s->car->type != T_VOID))) { +  if (s && +  ((s->type == T_FUNCTION) || +  ((s->type == T_MANY) && (s->car->type != T_VOID)))) {    fprintf(stderr, ", ");    }    } -  if (s->type != T_MANY) { +  if (!s || (s->type != T_MANY)) {    fprintf(stderr, ", @");    simple_describe_type(s);    fprintf(stderr, ")");