1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-11 02:05:39 +02:00

[268830] - fixing the case when value string is empty or null

This commit is contained in:
Alena Laskavaia 2009-03-17 19:10:56 +00:00
parent e659686dd8
commit 62474d01f8

View file

@ -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;