Skip to content

Commit 31be818

Browse files
committed
[fix] fix error of computing CallingConvention in MethodBridge/Generator::BuildCalliMethods
1 parent 213a11f commit 31be818

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Editor/MethodBridge/Generator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ private List<CalliMethodInfo> BuildCalliMethods(List<CallNativeMethodSignatureIn
638638
sharedMethod.Init();
639639
sharedMethod = ToIsomorphicMethod(sharedMethod);
640640

641-
CallingConvention callingConv = (CallingConvention)((int)method.MethodSig.CallingConvention + 1);
641+
CallingConvention callingConv = (CallingConvention)((int)(method.MethodSig.CallingConvention & dnlib.DotNet.CallingConvention.Mask) + 1);
642642
string signature = MakeCalliSignature(sharedMethod, callingConv);
643643

644644
if (!methodsBySig.TryGetValue(signature, out var arm))

0 commit comments

Comments
 (0)