From f16a176beb602d0ec01c045e869c351db5ba4d78 Mon Sep 17 00:00:00 2001 From: 1Axen Date: Tue, 9 Sep 2025 05:45:19 +0300 Subject: [PATCH] Fix bulk_insert not ensuring archetype ids are sorted --- jecs.luau | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jecs.luau b/jecs.luau index b6169b3..eef2e2f 100755 --- a/jecs.luau +++ b/jecs.luau @@ -2050,7 +2050,9 @@ local function ecs_bulk_insert(world: world, entity: i53, ids: { i53 }, values: local from = r.archetype local component_index = world.component_index if not from then - local dst_types = ids + local dst_types = table.clone(ids) + table.sort(dst_types) + local to = archetype_ensure(world, dst_types) new_entity(entity, r, to) local ROOT_ARCHETYPE = world.ROOT_ARCHETYPE