From 6963c00016b2709101ca07dc9b4f09ec47cd8679 Mon Sep 17 00:00:00 2001 From: Sierraffinity Date: Mon, 25 May 2020 18:45:46 -0700 Subject: [PATCH] battle_anim_mons: Make cast not depend on size of struct --- src/battle_anim_mons.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 861c5f6ca5..e5a866999c 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -1743,7 +1743,7 @@ void PrepareAffineAnimInTaskData(struct Task *task, u8 spriteId, const union Aff bool8 RunAffineAnimFromTaskData(struct Task *task) { - gAnimTaskAffineAnim = LoadPointerFromVars(task->data[13], task->data[14]) + (task->data[7] << 3); + gAnimTaskAffineAnim = &((union AffineAnimCmd *)LoadPointerFromVars(task->data[13], task->data[14]))[task->data[7]]; switch (gAnimTaskAffineAnim->type) { default: