From 4b6165ab8d64e069517aa4f3a1bd49b941b43a0d Mon Sep 17 00:00:00 2001 From: Dagg Date: Sat, 10 Sep 2022 11:29:45 -0700 Subject: [PATCH] Leave a NULL character of padding --- UnionPatcher/Patcher.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UnionPatcher/Patcher.cs b/UnionPatcher/Patcher.cs index 08f3f94..7593974 100644 --- a/UnionPatcher/Patcher.cs +++ b/UnionPatcher/Patcher.cs @@ -54,8 +54,8 @@ public static class Patcher { foreach(Match urlMatch in urls) { string url = urlMatch.Value; - if(serverUrl.Length > url.Length) { - throw new ArgumentOutOfRangeException(nameof(serverUrl), $"Server URL ({serverUrl.Length} characters long) is above maximum length {url.Length}"); + if(serverUrl.Length > url.Length - 1) { + throw new ArgumentOutOfRangeException(nameof(serverUrl), $"Server URL ({serverUrl.Length} characters long) is above maximum length {url.Length - 1}"); } int offset = urlMatch.Index;