From 6095e2e85a2053b1e9255b3c2ceea4fb61e19cfc Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Thu, 20 Nov 2025 14:05:54 +0100 Subject: [PATCH] Fix compile on gcc11 (#8300) --- src/item_use.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/item_use.c b/src/item_use.c index b97ac1202b..460eb8a883 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -1254,8 +1254,7 @@ bool32 CannotUseItemsInBattle(u16 itemId, struct Pokemon *mon) switch (battleUsage) { case EFFECT_ITEM_INCREASE_STAT: - u32 ability = GetBattlerAbility(gBattlerInMenuId); - if (CompareStat(gBattlerInMenuId, GetItemEffect(itemId)[1], MAX_STAT_STAGE, CMP_EQUAL, ability)) + if (CompareStat(gBattlerInMenuId, GetItemEffect(itemId)[1], MAX_STAT_STAGE, CMP_EQUAL, GetBattlerAbility(gBattlerInMenuId))) cannotUse = TRUE; break; case EFFECT_ITEM_SET_FOCUS_ENERGY: