From 31be818bb680dfa23f617f8f844f56e8c44c2445 Mon Sep 17 00:00:00 2001 From: walon Date: Wed, 30 Apr 2025 15:30:03 +0800 Subject: [PATCH] [fix] fix error of computing CallingConvention in MethodBridge/Generator::BuildCalliMethods --- Editor/MethodBridge/Generator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Editor/MethodBridge/Generator.cs b/Editor/MethodBridge/Generator.cs index ecd3485..71f8344 100644 --- a/Editor/MethodBridge/Generator.cs +++ b/Editor/MethodBridge/Generator.cs @@ -638,7 +638,7 @@ namespace HybridCLR.Editor.MethodBridge sharedMethod.Init(); sharedMethod = ToIsomorphicMethod(sharedMethod); - CallingConvention callingConv = (CallingConvention)((int)method.MethodSig.CallingConvention + 1); + CallingConvention callingConv = (CallingConvention)((int)(method.MethodSig.CallingConvention & dnlib.DotNet.CallingConvention.Mask) + 1); string signature = MakeCalliSignature(sharedMethod, callingConv); if (!methodsBySig.TryGetValue(signature, out var arm))