Browse Source

#1796: If TSAB.PrintIntegralValuesAsHex is set, do not use special constant fields.

pull/2150/head
Siegfried Pammer 6 years ago
parent
commit
68af5c2dd7
  1. 5
      ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs

5
ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs

@ -928,8 +928,11 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -928,8 +928,11 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
else
{
if (IsSpecialConstant(underlyingType, constantValue, out var expr))
if (!(PrintIntegralValuesAsHex && underlyingType.IsCSharpPrimitiveIntegerType())
&& IsSpecialConstant(underlyingType, constantValue, out var expr))
{
return expr;
}
if (underlyingType.IsKnownType(KnownTypeCode.Double) || underlyingType.IsKnownType(KnownTypeCode.Single))
return ConvertFloatingPointLiteral(underlyingType, constantValue);
IType literalType = underlyingType;

Loading…
Cancel
Save