Skip to content

Commit 000ff96

Browse files
committed
fix(managed): Event Argument decode (@samyycX)
1 parent 7db5736 commit 000ff96

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/managed/Internal_API/EventsListener.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,8 @@ private static unsafe EventResult CallEventHandlers(ref List<API.Scripting.Event
2727
if (functionParams.Length == j + 1) break;
2828
Type t = functionParams[j + 1].ParameterType;
2929
byte* arg = (byte*)args[j];
30-
if(Cacher.ConsiderTypeAPointer(ref t))
31-
{
32-
byte* marg = (byte*)&arg;
33-
a.Add(CallContext.ReadValue(ref t, ref marg));
34-
}
35-
else
36-
{
37-
a.Add(CallContext.ReadValue(ref t, ref arg));
38-
}
30+
byte* marg = (byte*)&arg;
31+
a.Add(CallContext.ReadValue(ref t, ref marg));
3932
}
4033
returnValue = eventInfo.Callback(eventInfo.TargetInstance, a.ToArray()) ?? EventResult.Continue;
4134
}

0 commit comments

Comments
 (0)