[haiku-commits] r33476 - haiku/trunk/src/apps/debugger/gui/team_window

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 7 Oct 2009 05:16:43 +0200 (CEST)

Author: bonefish
Date: 2009-10-07 05:16:43 +0200 (Wed, 07 Oct 2009)
New Revision: 33476
Changeset: http://dev.haiku-os.org/changeset/33476/haiku

Modified:
   haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp
Log:
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.



Modified: haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp     
2009-10-07 00:24:19 UTC (rev 33475)
+++ haiku/trunk/src/apps/debugger/gui/team_window/VariablesView.cpp     
2009-10-07 03:16:43 UTC (rev 33476)
@@ -580,8 +580,9 @@
                                                }
 
                                                
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;


Other related posts:

  • » [haiku-commits] r33476 - haiku/trunk/src/apps/debugger/gui/team_window - ingo_weinhold