From d621fb88d7b8dc5c08b7cc44af7f3d505a6e338d Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 9 Dec 2014 22:45:59 -0500 Subject: [PATCH] Debugger: Fix problem in ArrayValueNode. - The requested child indices weren't being correctly capped to the supported lower and upper bound. --- src/apps/debugger/value/value_nodes/ArrayValueNode.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/apps/debugger/value/value_nodes/ArrayValueNode.cpp b/src/apps/debugger/value/value_nodes/ArrayValueNode.cpp index bc05323c02..301361e66e 100644 --- a/src/apps/debugger/value/value_nodes/ArrayValueNode.cpp +++ b/src/apps/debugger/value/value_nodes/ArrayValueNode.cpp @@ -137,13 +137,13 @@ AbstractArrayValueNode::CreateChildrenInRange(int32 lowIndex, fLowerBound = lowerBound; fUpperBound = upperBound; fBoundsInitialized = true; - } else { - if (lowIndex < fLowerBound) - fLowerBound = lowIndex; - if (highIndex > fUpperBound) - fUpperBound = highIndex; } + if (lowIndex < fLowerBound) + lowIndex = fLowerBound; + if (highIndex > fUpperBound) + highIndex = fUpperBound; + // create children for the array elements for (int32 i = lowIndex; i <= highIndex; i++) { BString name(Name());