Skip to content

Commit

Permalink
Fixed testrunner UB with RandomElement. (#3013)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgriffin authored May 17, 2023
2 parents 37874fe + d22efc9 commit 7a97569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_runner_battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ const void *RandomElementArray(enum RandomTag tag, const void *array, size_t siz

if (turn && turn->rng.tag == tag)
{
u32 element;
u32 element = 0;
for (index = 0; index < count; index++)
{
memcpy(&element, (const u8 *)array + size * index, size);
Expand Down

0 comments on commit 7a97569

Please sign in to comment.