From 8c5ae3f1613168993150b0d89af91db50f0fde25 Mon Sep 17 00:00:00 2001 From: David Rodenkirchen Date: Fri, 18 Aug 2023 16:44:56 +0200 Subject: [PATCH] revert change that was amde wrong --- BattleBitAPI/Server/ServerListener.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BattleBitAPI/Server/ServerListener.cs b/BattleBitAPI/Server/ServerListener.cs index d283b88..df65bb6 100644 --- a/BattleBitAPI/Server/ServerListener.cs +++ b/BattleBitAPI/Server/ServerListener.cs @@ -338,7 +338,7 @@ namespace BattleBitAPI.Server throw new Exception("Unable to read the Loading Screen Text Size"); int stringSize = readStream.ReadUInt16(); - if (stringSize > Const.MaxLoadingScreenTextLength) + if (stringSize < Const.MinLoadingScreenTextLength || stringSize > Const.MaxLoadingScreenTextLength) throw new Exception("Invalid server Loading Screen Text Size"); if (stringSize > 0) @@ -363,7 +363,7 @@ namespace BattleBitAPI.Server throw new Exception("Unable to read the Server Rules Text Size"); int stringSize = readStream.ReadUInt16(); - if (stringSize > Const.MaxServerRulesTextLength) + if (stringSize < Const.MinServerRulesTextLength || stringSize > Const.MaxServerRulesTextLength) throw new Exception("Invalid server Server Rules Text Size"); if (stringSize > 0)