Branch: Tag:

2021-01-22

2021-01-22 16:44:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix binops where one or both operands is NULL.

4341:   #endif    }    -  if (!a || !b) return NULL; +  if (!a || !b) { +  if (a) { +  if (op & PT_BINOP_MINUS) { +  add_ref(a); +  return a; +  } +  } else if (b) { +  if (op & PT_BINOP_INVERSE_MINUS) { +  add_ref(b); +  return b; +  } +  } else if (op & PT_BINOP_NOR) { +  type_stack_mark(); +  push_type(T_MIXED); +  push_type(T_VOID); +  push_type(T_OR); +  return pop_unfinished_string(); +  } +  return NULL; +  }       if (a == b) {    if (op & PT_BINOP_AND) {