allow passing 0 to ecs_map_next
@@ -443,10 +443,11 @@ void* _ecs_map_next(
const ecs_map_t *map = iter->map;
ecs_assert(map != NULL, ECS_INVALID_PARAMETER, NULL);
- ecs_assert(elem_size == map->elem_size, ECS_INVALID_PARAMETER, NULL);
+ ecs_assert(!elem_size || elem_size == map->elem_size, ECS_INVALID_PARAMETER, NULL);
ecs_bucket_t *bucket = iter->bucket;
int32_t element_index = iter->element_index;
+ elem_size = map->elem_size;
do {
if (!bucket) {
