# HG changeset patch # User Christian Kamm # Date 1240738170 -7200 # Node ID bbe6d2b878426d5dafe6ccdd21772e12aeb6b647 # Parent 7ffac0079d08d80edaef33a98e40e94bb113de2f Fix interface indices. Closes #269 and #266. diff -r 7ffac0079d08 -r bbe6d2b87842 ir/irtypeclass.cpp --- 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); } }