Skip to content

Commit

Permalink
use OBJ_EVENT_GFX_SPECIES_MASK in bufferspeciesname (#5088)
Browse files Browse the repository at this point in the history
Co-authored-by: sbird <[email protected]>
  • Loading branch information
SBird1337 and sbird authored Aug 5, 2024
1 parent fd3cb6f commit 1f93c25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scrcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ bool8 ScrCmd_vmessage(struct ScriptContext *ctx)
bool8 ScrCmd_bufferspeciesname(struct ScriptContext *ctx)
{
u8 stringVarIndex = ScriptReadByte(ctx);
u16 species = VarGet(ScriptReadHalfword(ctx)) & ((1 << 10) - 1); // ignore possible shiny / form bits
u16 species = VarGet(ScriptReadHalfword(ctx)) & OBJ_EVENT_GFX_SPECIES_MASK; // ignore possible shiny / form bits

StringCopy(sScriptStringVars[stringVarIndex], GetSpeciesName(species));
return FALSE;
Expand Down

0 comments on commit 1f93c25

Please sign in to comment.