https://github.com/pret/pokeemerald/blob/9bf7a77/src/pokemon_storage_system.c#L560
static u32 sItemIconGfxBuffer[98]; think this definition causes UB, the sprite sheet size is 0x200 but this only allocates 0x188 bytes
https://github.com/pret/pokeemerald/blob/9bf7a77/src/pokemon_storage_system.c#L8735-L8737
spriteSheet.data = sItemIconGfxBuffer;
spriteSheet.size = 0x200;
spriteTemplate = sSpriteTemplate_ItemIcon;
Noticed this when I tried to move this buffer to alloc'd space