Permalink
Browse files

Fixed object inheritance XML generation.

The problem was in wrong insertion of additional <base> nodes to the main <object> node. If any base node already exists, additional nodes should be inserted after it. However the test that checked for this condition was spelled incorrectly - instead of >, == was used. This is fixed now.
  • Loading branch information...
1 parent 3a46c43 commit 1661cb830bf6cb958862f221c3d53c44d72c8a94 @tomaz committed Jun 12, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 XMLOutputGenerator.m
View
@@ -878,7 +878,7 @@ - (void) fixInheritanceForObject:(NSString*) objectName
// subnodes, we will properly setup the insertion index after the last one.
NSUInteger insertionIndex = ([objectNode childCount] < 4) ? [objectNode childCount] - 1 : 3;
NSArray* baseNodes = [objectNode nodesForXPath:@"base" error:nil];
- if ([baseNodes count] == 0)
+ if ([baseNodes count] > 0)
{
insertionIndex = [[baseNodes lastObject] index] + 1;
}

0 comments on commit 1661cb8

Please sign in to comment.