From 3c5091e040df3c325f0c0b91dce30905e9c01de8 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 30 Nov 2022 21:13:41 +0000 Subject: [PATCH] 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 --- VpSharp.Commands/CommandsExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VpSharp.Commands/CommandsExtension.cs b/VpSharp.Commands/CommandsExtension.cs index facd472..6acd770 100644 --- a/VpSharp.Commands/CommandsExtension.cs +++ b/VpSharp.Commands/CommandsExtension.cs @@ -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.");