don't seg when constants are involved in && or || expressions

This commit is contained in:
Bill Currie 2004-02-09 02:23:37 +00:00
parent 499dac6bb1
commit 1181fb267b
1 changed files with 8 additions and 0 deletions

View File

@ -1065,6 +1065,14 @@ merge (ex_list_t *l1, ex_list_t *l2)
{
ex_list_t *m;
if (!l1 && !l2) {
error (0, "internal error");
abort ();
}
if (!l2)
return l1;
if (!l1)
return l2;
m = malloc ((size_t)&((ex_list_t *)0)->e[l1->size + l2->size]);
m->size = l1->size + l2->size;
memcpy (m->e, l1->e, l1->size * sizeof (expr_t *));