mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
don't seg when constants are involved in && or || expressions
This commit is contained in:
parent
499dac6bb1
commit
1181fb267b
1 changed files with 8 additions and 0 deletions
|
@ -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 *));
|
||||
|
|
Loading…
Reference in a new issue