maybe fix a maybe bug in maybe code that maybe will ever be run

This commit is contained in:
nattthebear 2020-05-15 19:44:28 -04:00
parent de6208d264
commit 61f269f097
1 changed files with 2 additions and 2 deletions

View File

@ -154,11 +154,11 @@ namespace BizHawk.BizInvoke
throw new InvalidOperationException("Out of Thunk memory"); 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++) for (int i = 0; i < _refs.Length; i++)
{ {
if (_refs[i] == o) if (_refs[i]?.Target == lifetime)
return i; return i;
} }
return -1; return -1;