mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
Bug 303629 unsigned char should never appear negative in the Variables view.
This commit is contained in:
parent
2dc9a8c1d3
commit
79ece8daa2
1 changed files with 6 additions and 4 deletions
|
@ -289,10 +289,12 @@ public class CValue extends AbstractCValue {
|
|||
return "'\\r'"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
if (Character.isISOControl(byteValue) || byteValue < 0)
|
||||
if (Character.isISOControl(byteValue))
|
||||
return Byte.toString(byteValue);
|
||||
else if (byteValue < 0)
|
||||
return isUnsigned() ? Short.toString(value.shortValue()) : Byte.toString(byteValue);
|
||||
|
||||
return new String( new byte[]{ '\'', byteValue, '\'' } ); //$NON-NLS-1$
|
||||
return new String( new byte[]{ '\'', byteValue, '\'' } );
|
||||
}
|
||||
else if ( CVariableFormat.DECIMAL.equals( format ) ) {
|
||||
return (isUnsigned()) ? Integer.toString( value.shortValue() ) : Integer.toString( (byte)value.byteValue() );
|
||||
|
|
Loading…
Add table
Reference in a new issue