From dd1b0b306743296e3f0d46749a3bbb3a64763fdb Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Sat, 1 Nov 2025 19:39:28 +0100 Subject: [PATCH] Initialize DamageContext struct with zero values Also forgot to initialize the struct in `Cmd_damagecalc` --- src/battle_script_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 353d0e16e7..bc4e8d6551 100755 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1806,7 +1806,7 @@ static void Cmd_damagecalc(void) u32 moveTarget = GetBattlerMoveTargetType(gBattlerAttacker, gCurrentMove); - struct DamageContext ctx; + struct DamageContext ctx = {0}; ctx.battlerAtk = gBattlerAttacker; ctx.move = gCurrentMove; ctx.moveType = GetBattleMoveType(gCurrentMove);