From a8e550d6f54d518d16d940bcf83e81d626a516ec Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:32:51 +0800 Subject: [PATCH] fix --- src/EcsWorld.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EcsWorld.cs b/src/EcsWorld.cs index 56f524d..91bf70b 100644 --- a/src/EcsWorld.cs +++ b/src/EcsWorld.cs @@ -1010,10 +1010,10 @@ namespace DCFApixels.DragonECS { if ((chunk & bit) != 0) { - componentIDs[arrayIndex] = poolIndex; + componentIDs[arrayIndex++] = poolIndex; itemsCount--; - if (itemsCount <= 0) { return itemsCount; } + if (itemsCount <= 0) { return arrayIndex; } } poolIndex++; bit <<= 1; @@ -1030,10 +1030,10 @@ namespace DCFApixels.DragonECS { if ((chunk & bit) != 0) { - componentIDs[arrayIndex] = poolIndex; + componentIDs[arrayIndex++] = poolIndex; itemsCount--; - if (itemsCount <= 0) { return itemsCount; } + if (itemsCount <= 0) { return arrayIndex; } } poolIndex++; bit <<= 1;