changeset 1265:bbe6d2b87842

Fix interface indices. Closes #269 and #266.
author Christian Kamm <kamm incasoftware de>
date Sun, 26 Apr 2009 11:29:30 +0200
parents 7ffac0079d08
children 17d4d554300a
files ir/irtypeclass.cpp
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ir/irtypeclass.cpp	Sun Apr 26 10:29:39 2009 +0200
+++ b/ir/irtypeclass.cpp	Sun Apr 26 11:29:30 2009 +0200
@@ -265,10 +265,11 @@
     // add this interface
     interfaceMap.insert(std::make_pair(inter, index));
 
-    // add all its base interfaces recursively
-    for (size_t i = 0; i < inter->interfaces_dim; i++)
+    // add the direct base interfaces recursively - they
+    // are accessed through the same index
+    if (inter->interfaces_dim > 0)
     {
-        BaseClass* b = inter->interfaces[i];
+        BaseClass* b = inter->interfaces[0];
         addInterfaceToMap(b->base, index);
     }
 }