From 88b88511567abbeae3d09cc57d56df6c45aeb0a4 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Fri, 24 Nov 2023 21:06:36 -0800 Subject: [PATCH] fix: Fixes argument out of range error from empty tile list (#1612) --- Projects/Server/TileList.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Projects/Server/TileList.cs b/Projects/Server/TileList.cs index f0c2d5cf2..3d26e74bb 100644 --- a/Projects/Server/TileList.cs +++ b/Projects/Server/TileList.cs @@ -28,6 +28,11 @@ public class TileList public void AddRange(ReadOnlySpan tiles) { + if (tiles.Length == 0) + { + return; + } + TryResize(tiles.Length); for (var i = 0; i < tiles.Length; ++i) {