From 62474d01f853c6d1743455a1148f8347b98a531d Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Tue, 17 Mar 2009 19:10:56 +0000 Subject: [PATCH] [268830] - fixing the case when value string is empty or null --- .../cdt/debug/mi/core/cdi/model/type/ArrayValue.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java index 6a562e42494..79ee5e924b7 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java @@ -43,10 +43,9 @@ public class ArrayValue extends DerivedValue implements ICDIArrayValue, ICDIPoin */ public ArrayValue(Variable v, String hexAddress) { super(v); - if (hexAddress == null) { - return; - } - if (hexAddress.startsWith("0x") || hexAddress.startsWith("0X")) { + if (hexAddress == null || hexAddress.trim().length()==0) { + this.hexAddress = "0"; + } else if (hexAddress.startsWith("0x") || hexAddress.startsWith("0X")) { this.hexAddress = hexAddress.substring(2); } else { this.hexAddress = hexAddress;