mirror of
https://github.com/pret/pokeruby.git
synced 2026-09-08 19:16:07 -05:00
don't specify arguments in GetMonData()/GetBoxMonData() prototypes
This commit is contained in:
@@ -375,8 +375,8 @@ void GetMonSpriteTemplate_803C5A0(u16 species, u8 a2);
|
||||
void EncryptBoxMon(struct BoxPokemon *boxMon);
|
||||
void DecryptBoxMon(struct BoxPokemon *boxMon);
|
||||
union PokemonSubstruct *GetSubstruct(struct BoxPokemon *boxMon, u32 personality, u8 substructType);
|
||||
u32 GetMonData(struct Pokemon *mon, s32 field, u8 *data);
|
||||
u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data);
|
||||
u32 GetMonData();
|
||||
u32 GetBoxMonData();
|
||||
void SetMonData(struct Pokemon *mon, s32 field, const u8 *data);
|
||||
void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const u8 *data);
|
||||
void CopyMon(void *dest, void *src, size_t size);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user