the tp_sdef field of the type structure may only be used after checking tp_fund

This commit is contained in:
ceriel 1990-05-15 15:28:01 +00:00
parent 9570000674
commit 0c6f2f490f

View file

@ -571,11 +571,17 @@ int qual;
ASSERT(tp); ASSERT(tp);
if (tp->tp_typequal & qual) return 1; if (tp->tp_typequal & qual) return 1;
sdf = tp->tp_sdef; switch(tp->tp_fund) {
while (sdf) { case UNION:
if (recurqual(sdf->sd_type, qual)) case STRUCT:
return 1; case ENUM:
sdf = sdf->sd_sdef; sdf = tp->tp_sdef;
while (sdf) {
if (recurqual(sdf->sd_type, qual))
return 1;
sdf = sdf->sd_sdef;
}
break;
} }
return 0; return 0;
} }