Skip to content

Commit 03ecd3b

Browse files
authored
Fixed invalid index on ecsact_get_components (#12)
1 parent dc9acb0 commit 03ecd3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ecsact/entt/runtime.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ namespace ecsact::entt {
393393
if(index >= max_components_count) return;
394394

395395
if(has_component<C>(registry_id, entity_id)) {
396-
index += 1;
397396
out_component_ids[index] = C::id;
398397
if constexpr(std::is_empty_v<C>) {
399398
out_components_data[index] = nullptr;
@@ -403,6 +402,7 @@ namespace ecsact::entt {
403402
entity_id
404403
);
405404
}
405+
index += 1;
406406
}
407407
});
408408

0 commit comments

Comments
 (0)