Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
8fd084e497
1 changed files with 6 additions and 1 deletions
  1. 6 1
      direct/src/dcparse/dcClass.cxx

+ 6 - 1
direct/src/dcparse/dcClass.cxx

@@ -138,7 +138,12 @@ DCField *DCClass::
 get_inherited_field(int n) {
 get_inherited_field(int n) {
   if (!_parents.empty()) {
   if (!_parents.empty()) {
     // This won't work for multiple dclass inheritance.
     // This won't work for multiple dclass inheritance.
-    n -= _parents.front()->get_num_inherited_fields();
+    int psize = _parents.front()->get_num_inherited_fields();
+    if (n < psize) {
+      return _parents.front()->get_inherited_field(n);
+    }
+
+    n -= psize;
   }
   }
   return get_field(n);
   return get_field(n);
 }
 }