fix: Fixes argument out of range error from empty tile list (#1612)

This commit is contained in:
Kamron Batman 2023-11-24 21:06:36 -08:00 committed by GitHub
parent 3109f59d4d
commit 88b8851156
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,6 +28,11 @@ public class TileList
public void AddRange(ReadOnlySpan<StaticTile> tiles)
{
if (tiles.Length == 0)
{
return;
}
TryResize(tiles.Length);
for (var i = 0; i < tiles.Length; ++i)
{