[qfcc] Allow assignment of arrays to void pointers

I guess it just never came up until now.
This commit is contained in:
Bill Currie 2023-05-14 12:36:48 +09:00
parent 717cbaff87
commit 8e1883a306

View file

@ -1253,7 +1253,8 @@ type_assignable (const type_t *dst, const type_t *src)
return 1; return 1;
// pointer = array // pointer = array
if (is_ptr (dst) && is_array (src)) { if (is_ptr (dst) && is_array (src)) {
if (dst->t.fldptr.type == src->t.array.type) if (is_void (dst->t.fldptr.type)
|| dst->t.fldptr.type == src->t.array.type)
return 1; return 1;
return 0; return 0;
} }