Actually allocate a banner when using GetOrCreateBanner

When importing a file this function is used to create a banner at a certain index. Previously this was not assigning the id to the banner id. Luckily as banner id is a new field this did not cause any issues except in the nsf which does use the banner id more extensively
This commit is contained in:
Duncan 2021-07-27 18:58:09 +01:00 committed by GitHub
parent ada94dce37
commit d76611e0f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -406,7 +406,10 @@ Banner* GetOrCreateBanner(BannerIndex id)
{
_banners.resize(id + 1);
}
return &_banners[id];
// Create the banner
auto& banner = _banners[id];
banner.id = id;
return &banner;
}
return nullptr;
}