From d22efc9a68efafd54debd153849f08169d86f581 Mon Sep 17 00:00:00 2001 From: AgustinGDLV Date: Tue, 16 May 2023 23:14:54 -0700 Subject: [PATCH] fixed UB with unassigned variable --- test/test_runner_battle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_runner_battle.c b/test/test_runner_battle.c index cfe5db9d6eb0..d69f2125b45c 100644 --- a/test/test_runner_battle.c +++ b/test/test_runner_battle.c @@ -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);