From d48ea308bf5cfb09b5d98270a81d03d543d2ad2a Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 7 Oct 2009 03:16:43 +0000 Subject: [PATCH] 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 --- src/apps/debugger/gui/team_window/VariablesView.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apps/debugger/gui/team_window/VariablesView.cpp b/src/apps/debugger/gui/team_window/VariablesView.cpp index b0a331669f..b89b08625c 100644 --- a/src/apps/debugger/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/gui/team_window/VariablesView.cpp @@ -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;