Browse Source

Improve assertion to apply to the C# type instead of the ILAst type

pull/2856/head
Daniel Grunwald 2 years ago committed by GitHub
parent
commit
747d4c8178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs

2
ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs

@ -1902,7 +1902,7 @@ namespace ICSharpCode.Decompiler.CSharp @@ -1902,7 +1902,7 @@ namespace ICSharpCode.Decompiler.CSharp
{
Debug.Assert(op == AssignmentOperatorType.Add || op == AssignmentOperatorType.Subtract);
#if DEBUG
if (inst.Type is PointerType ptrType)
if (target.Type is PointerType ptrType)
{
ILInstruction instValue = PointerArithmeticOffset.Detect(inst.Value, ptrType.ElementType, inst.CheckForOverflow);
Debug.Assert(instValue is not null);

Loading…
Cancel
Save