[qfcc] Copy parameter qualifiers when copying type

Fixes a segfault for some functions (generics?) cause by the new
parameter qualifiers.
This commit is contained in:
Bill Currie 2024-09-07 02:39:13 +09:00
parent 55a5782a95
commit 13d38622f7

View file

@ -608,8 +608,10 @@ find_type (const type_t *type)
}
if (num_params) {
check->func.param_types = malloc (sizeof (type_t *) * num_params);
check->func.param_quals = malloc (sizeof (param_qual_t)*num_params);
for (int i = 0; i < num_params; i++) {
check->func.param_types[i] = t->func.param_types[i];
check->func.param_quals[i] = t->func.param_quals[i];
}
}
}