diff --git a/src/gaemstone/ECS/Iterator.cs b/src/gaemstone/ECS/Iterator.cs index 3e5065c..ca82b61 100644 --- a/src/gaemstone/ECS/Iterator.cs +++ b/src/gaemstone/ECS/Iterator.cs @@ -51,8 +51,9 @@ public unsafe partial class Iterator { fixed (ecs_iter_t* ptr = &Value) { var size = (ulong)Unsafe.SizeOf(); + var isSelf = ecs_field_is_self(ptr, index); var pointer = ecs_field_w_size(ptr, size, index); - return new Span(pointer, Count); + return new(pointer, isSelf ? Count : 1); } }