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 d05cc4ae3e
commit 0454c6f9c3

View File

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