mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
fixed UB with unassigned variable
This commit is contained in:
parent
37874fe5c1
commit
d22efc9a68
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user