Skip to content

Commit

Permalink
Fix access to uninitialized ecs_cmd_t::id field
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMertens committed Dec 15, 2024
1 parent a65b71c commit a977d43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions distr/flecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -17290,6 +17290,7 @@ ecs_cmd_t* flecs_cmd_new(
ecs_cmd_t *cmd = ecs_vec_append_t(&stage->allocator, &stage->cmd->queue,
ecs_cmd_t);
cmd->is._1.value = NULL;
cmd->id = 0;
cmd->next_for_entity = 0;
cmd->entry = NULL;
cmd->system = stage->system;
Expand Down
1 change: 1 addition & 0 deletions src/stage.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ecs_cmd_t* flecs_cmd_new(
ecs_cmd_t *cmd = ecs_vec_append_t(&stage->allocator, &stage->cmd->queue,
ecs_cmd_t);
cmd->is._1.value = NULL;
cmd->id = 0;
cmd->next_for_entity = 0;
cmd->entry = NULL;
cmd->system = stage->system;
Expand Down

0 comments on commit a977d43

Please sign in to comment.