1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-09 22:55:42 +00:00

Validate parameter length before invoking

This commit is contained in:
Oliver Booth 2022-12-08 18:31:06 +00:00
parent 2f3069d1bf
commit 29ed6155a5
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634

View File

@ -269,6 +269,11 @@ public sealed class CommandsExtension : VirtualParadiseClientExtension
}
}
if (command.Method.GetParameters().Length != arguments.Length)
{
return base.OnMessageReceived(args);
}
object? returnValue = command.Method.Invoke(command.Module, arguments);
if (returnValue is Task task)
{