The type component path for the first array dimension was constructed

incorrectly. We must only replace the last component of the parent's path for
all following dimensions.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33476 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-10-07 03:16:43 +00:00
parent 047eef826e
commit d48ea308bf

View File

@ -580,8 +580,9 @@ private:
}
component.SetToArrayElement(type->Kind(), indexPath);
TypeComponentPath* elementPath
= path->CreateSubPath(path->CountComponents() - 1);
TypeComponentPath* elementPath = path->CreateSubPath(
path->CountComponents()
- (baseDimension == 0 ? 0 : 1));
if (elementPath == NULL
|| !elementPath->AddComponent(component)) {
delete elementPath;