From 9129c65f79e299f101732dd069382850162b62af Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 17 Jun 2016 07:40:32 +0900 Subject: [PATCH] always convert ldlen to UIntPtr instead of IntPtr, because it is unsigned as per spec --- ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs b/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs index d51d43c75..f74c90467 100644 --- a/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs @@ -774,7 +774,7 @@ namespace ICSharpCode.Decompiler.CSharp var lenExpr = arrayExpr.Expression.Member("LongLength") .WithILInstruction(inst) .WithRR(new ResolveResult(compilation.FindType(KnownTypeCode.Int64))); - return lenExpr.ConvertTo(compilation.FindType(KnownTypeCode.IntPtr), this); + return lenExpr.ConvertTo(compilation.FindType(KnownTypeCode.UIntPtr), this); } protected internal override TranslatedExpression VisitLdFlda(LdFlda inst)