Fixed testrunner UB with RandomElement. (#3013)

This commit is contained in:
Martin Griffin 2023-05-17 07:55:54 +01:00 committed by GitHub
commit 7a9756953f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);