1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-22 13:48:48 +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:
Oliver Booth 2022-11-30 21:13:41 +00:00
parent c7709d9b93
commit 3c5091e040
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634

View File

@ -146,7 +146,7 @@ public sealed class CommandsExtension : VirtualParadiseClientExtension
}
ConstructorInfo[] constructors = moduleType.GetTypeInfo().DeclaredConstructors.Where(c => c.IsPublic).ToArray();
if (constructors.Length != 0)
if (constructors.Length != 1)
{
throw new ArgumentException(
$"Constructor for {moduleType} is not public, or {moduleType} has more than one public constructor.");