Initialize DamageContext struct with zero values

Also forgot to initialize the struct in `Cmd_damagecalc`
This commit is contained in:
Alex 2025-11-01 19:39:28 +01:00 committed by GitHub
parent 3fb472777b
commit dd1b0b3067
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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