genaray / Arch.Extended

Extensions for Arch with some useful features like Systems, Source Generator and Utils.
Apache License 2.0
152 stars 35 forks source link

Fixing ContainsKey #50

Closed RoyconSkylands closed 10 months ago

RoyconSkylands commented 10 months ago

Found a bug when adding a component and its Index is the size of the SparseJaggedArray, was throwing a System.IndexOutOfRangeException

RoyconSkylands commented 10 months ago

Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array. at SkylandKingdoms.Game.Island.Buildings.CreateBuildingSystem.Update(GameTick tick, Entity buildingEntity, CreateBuildingComponent& createBuildingComponent) in C:\Projects\SkylandKingdoms\Game\SkylandKingdoms.Game\Island\Buildings\CreateBuildingSystem.cs:line 71 at SkylandKingdoms.Game.Island.Buildings.CreateBuildingSystem.Update(GameTick state) in C:\Projects\SkylandKingdoms\Game\SkylandKingdoms.Game\Island\Buildings\CreateBuildingSystem.cs:line 51 at SkylandKingdoms.Game.Island.IslandWorldUpdateSystem.Update(GameTick state) in C:\Projects\SkylandKingdoms\Game\SkylandKingdoms.Game\Island\IslandWorldUpdateSystem.cs:line 30 at SkylandKingdoms.GameServer.GameLoop.Update() in C:\Projects\SkylandKingdoms\Server\SkylandKingdoms.GameServer\GameLoop.cs:line 222