From 593e9d9aef98df1a03093cd54aa2c8dbcd56edfb Mon Sep 17 00:00:00 2001 From: Noko Date: Sun, 20 Oct 2019 18:24:00 -0500 Subject: [PATCH] Fix edge case of importing exactly enough members to hit the cap It's OK if import will bring us to the cap (1000), just don't let the count go beyond that. --- PluralKit.Core/DataFiles.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.Core/DataFiles.cs b/PluralKit.Core/DataFiles.cs index b6e56945..8a9de1b3 100644 --- a/PluralKit.Core/DataFiles.cs +++ b/PluralKit.Core/DataFiles.cs @@ -121,7 +121,7 @@ namespace PluralKit.Bot // If creating the unmatched members would put us over the member limit, abort before creating any members // new total: # in the system + (# in the file - # in the file that already exist) - if (data.Members.Count - dataFileToMemberMapping.Count + existingMembers.Count() >= Limits.MaxMemberCount) + if (data.Members.Count - dataFileToMemberMapping.Count + existingMembers.Count() > Limits.MaxMemberCount) { result.Success = false; result.Message = $"Import would exceed the maximum number of members ({Limits.MaxMemberCount}).";