the tp_sdef field of the type structure may only be used after checking tp_fund
authorceriel <none@none>
Tue, 15 May 1990 15:28:01 +0000 (15:28 +0000)
committerceriel <none@none>
Tue, 15 May 1990 15:28:01 +0000 (15:28 +0000)
lang/cem/cemcom.ansi/ch3.c

index bfe03f1..0b1d062 100644 (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;
 }