From 82fed8ea6f95425e288aba6a5ff75efd2f9c508d Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Mon, 14 Sep 2020 12:56:52 -0700 Subject: [PATCH] Win32 interface abi fix --- BeefLibs/corlib/src/Reflection/MethodInfo.bf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BeefLibs/corlib/src/Reflection/MethodInfo.bf b/BeefLibs/corlib/src/Reflection/MethodInfo.bf index 68af1f6e..a90ddb68 100644 --- a/BeefLibs/corlib/src/Reflection/MethodInfo.bf +++ b/BeefLibs/corlib/src/Reflection/MethodInfo.bf @@ -305,6 +305,10 @@ namespace System.Reflection } bool splatThis = thisType.IsSplattable && !mMethodData.mFlags.HasFlag(.Mutating); +#if BF_PLATFORM_WINDOWS && BF_32_BIT + if ((mTypeInstance.IsInterface) && (splatThis)) + abi = .MS_CDecl; +#endif AddArg!::(-1, ref target, &target.[Friend]mData, thisType, splatThis); }