Fix converting nil to a pointer type.

This commit is contained in:
Bill Currie 2011-02-07 10:10:48 +09:00
parent b8127f7543
commit 829fb33e92
1 changed files with 2 additions and 0 deletions

View File

@ -1120,6 +1120,8 @@ convert_nil (expr_t *e, type_t *t)
{
memset (&e->e.value, 0, sizeof (e->e.value));
e->e.value.type = t->type;
if (t->type == ev_pointer)
e->e.value.v.pointer.type = t->t.fldptr.type;
e->type = ex_value;
}