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:
parent
e659686dd8
commit
62474d01f8
1 changed files with 3 additions and 4 deletions
|
@ -43,10 +43,9 @@ public class ArrayValue extends DerivedValue implements ICDIArrayValue, ICDIPoin
|
||||||
*/
|
*/
|
||||||
public ArrayValue(Variable v, String hexAddress) {
|
public ArrayValue(Variable v, String hexAddress) {
|
||||||
super(v);
|
super(v);
|
||||||
if (hexAddress == null) {
|
if (hexAddress == null || hexAddress.trim().length()==0) {
|
||||||
return;
|
this.hexAddress = "0";
|
||||||
}
|
} else if (hexAddress.startsWith("0x") || hexAddress.startsWith("0X")) {
|
||||||
if (hexAddress.startsWith("0x") || hexAddress.startsWith("0X")) {
|
|
||||||
this.hexAddress = hexAddress.substring(2);
|
this.hexAddress = hexAddress.substring(2);
|
||||||
} else {
|
} else {
|
||||||
this.hexAddress = hexAddress;
|
this.hexAddress = hexAddress;
|
||||||
|
|
Loading…
Add table
Reference in a new issue