From 61f269f0977d02b1ee7547efcdbbc54bcae5a962 Mon Sep 17 00:00:00 2001 From: nattthebear Date: Fri, 15 May 2020 19:44:28 -0400 Subject: [PATCH] maybe fix a maybe bug in maybe code that maybe will ever be run --- src/BizHawk.BizInvoke/CallingConventionAdapter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BizHawk.BizInvoke/CallingConventionAdapter.cs b/src/BizHawk.BizInvoke/CallingConventionAdapter.cs index 5770ca6d91..e85363effb 100644 --- a/src/BizHawk.BizInvoke/CallingConventionAdapter.cs +++ b/src/BizHawk.BizInvoke/CallingConventionAdapter.cs @@ -154,11 +154,11 @@ namespace BizHawk.BizInvoke throw new InvalidOperationException("Out of Thunk memory"); } - private int FindUsedIndex(object o) + private int FindUsedIndex(object lifetime) { for (int i = 0; i < _refs.Length; i++) { - if (_refs[i] == o) + if (_refs[i]?.Target == lifetime) return i; } return -1;