1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Check for null pointer in 'isCharacter' and 'isCharPointer'.

This commit is contained in:
Mikhail Khodjaiants 2003-04-24 15:41:38 +00:00
parent 65353ae67b
commit 2c27efbc06
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2003-04-23 Mikhail Khodjaiants
Check for null pointer in 'isCharacter' and 'isCharPointer'.
* CValue.java
2003-04-23 Mikhail Khodjaiants
Throw DebugException when getSignals() fails.
* CSignalManager.java

View file

@ -287,6 +287,7 @@ public class CValue extends CDebugElement implements ICValue
String value = getUnderlyingValueString().trim();
if ( value != null )
{
value = value.trim();
return ( value.startsWith( "0x" ) && value.indexOf( ' ' ) != -1 );
}
return false;
@ -294,10 +295,10 @@ public class CValue extends CDebugElement implements ICValue
public boolean isCharacter()
{
String value = getUnderlyingValueString().trim();
String value = getUnderlyingValueString();
if ( value != null )
{
return ( value.endsWith( "\'" ) );
return ( value.trim().endsWith( "\'" ) );
}
return false;
}