mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-22 19:58:48 +00:00
Validate parameter length before invoking
This commit is contained in:
parent
2f3069d1bf
commit
29ed6155a5
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user