From eea3e61cfd7a1a0dbcba3a5afa8be62c2a731fa4 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Fri, 21 Oct 2016 22:26:46 -0700 Subject: don't specify arguments in GetMonData()/GetBoxMonData() prototypes --- src/scrcmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/scrcmd.c b/src/scrcmd.c index 8e6bb987b..8b5107802 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1567,11 +1567,11 @@ bool8 ScrCmd_checkattack(struct ScriptContext *ctx) gScriptResult = 6; for (i = 0; i < 6; i++) { - register u8 *dummy asm("r2"); // UB: use of uninitialized variable u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL); if (!species) break; - if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG, dummy) && pokemon_has_move(&gPlayerParty[i], moveId) == TRUE) + // UB: GetMonData() arguments don't match function definition + if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) && pokemon_has_move(&gPlayerParty[i], moveId) == TRUE) { gScriptResult = i; gUnknown_0202E8CC = species; -- cgit v1.2.3