Skip to content

Commit

Permalink
fix: taking address of temporary array for cpp by @blkcatman
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Aug 19, 2023
1 parent e08c090 commit 71c3b3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/source/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ int32_t librg_world_fetch_chunkarray(librg_world *world, const librg_chunk *chun
}

int32_t librg_world_fetch_owner(librg_world *world, int64_t owner_id, int64_t *entity_ids, size_t *entity_amount) {
return librg_world_fetch_ownerarray(world, (int64_t[]){owner_id}, 1, entity_ids, entity_amount);
int64_t owner_ids[1]; owner_ids[0] = owner_id;
return librg_world_fetch_ownerarray(world, owner_ids, 1, entity_ids, entity_amount);
}

int32_t librg_world_fetch_ownerarray(librg_world *world, const int64_t *owner_ids, size_t owner_amount, int64_t *entity_ids, size_t *entity_amount) {
Expand Down

0 comments on commit 71c3b3a

Please sign in to comment.