mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Add safety check
This commit is contained in:
parent
57af90158d
commit
059e5467f7
@ -274,6 +274,11 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
|
||||
|
||||
if (loop_type)
|
||||
{
|
||||
if (!markers)
|
||||
{
|
||||
FATAL_ERROR("INST chunk loop without MARK chunk in file!\n");
|
||||
}
|
||||
|
||||
unsigned short marker_id = (aif->data[pos++] << 8);
|
||||
marker_id |= (uint8_t)aif->data[pos++];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user