mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-22 19:18:47 +00:00
I don't even need to explain this one
But in case you're curious: https://en.wikipedia.org/wiki/Off-by-one_error TL;DR I am stupid
This commit is contained in:
parent
c7709d9b93
commit
3c5091e040
@ -146,7 +146,7 @@ public sealed class CommandsExtension : VirtualParadiseClientExtension
|
|||||||
}
|
}
|
||||||
|
|
||||||
ConstructorInfo[] constructors = moduleType.GetTypeInfo().DeclaredConstructors.Where(c => c.IsPublic).ToArray();
|
ConstructorInfo[] constructors = moduleType.GetTypeInfo().DeclaredConstructors.Where(c => c.IsPublic).ToArray();
|
||||||
if (constructors.Length != 0)
|
if (constructors.Length != 1)
|
||||||
{
|
{
|
||||||
throw new ArgumentException(
|
throw new ArgumentException(
|
||||||
$"Constructor for {moduleType} is not public, or {moduleType} has more than one public constructor.");
|
$"Constructor for {moduleType} is not public, or {moduleType} has more than one public constructor.");
|
||||||
|
Loading…
Reference in New Issue
Block a user