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;