Browse Source

Fix OverflowException when searching for integer constants.

pull/258/head
Daniel Grunwald 14 years ago
parent
commit
a6f63d057d
  1. 2
      ILSpy/SearchPane.cs

2
ILSpy/SearchPane.cs

@ -398,7 +398,7 @@ namespace ICSharpCode.ILSpy @@ -398,7 +398,7 @@ namespace ICSharpCode.ILSpy
case TypeCode.Int64:
TypeCode tc = Type.GetTypeCode(val.GetType());
if (tc >= TypeCode.SByte && tc <= TypeCode.UInt64)
return Convert.ToInt64(val) == (long)searchTermLiteralValue;
return CSharpPrimitiveCast.Cast(TypeCode.Int64, val, false).Equals(searchTermLiteralValue);
else
return false;
case TypeCode.Single:

Loading…
Cancel
Save