Merge pull request #526 from JL2210/fix-bank-index

Fix indexing of banks array, fixes #525
This commit is contained in:
Eldred Habert
2020-06-21 12:44:17 +02:00
committed by GitHub

View File

@@ -88,8 +88,9 @@ void out_AddSection(struct Section const *section)
struct Section const *out_OverlappingSection(struct Section const *section) struct Section const *out_OverlappingSection(struct Section const *section)
{ {
struct SortedSections *banks = sections[section->type].banks;
struct SortedSection *ptr = struct SortedSection *ptr =
sections[section->type].banks[section->bank].sections; banks[section->bank - bankranges[section->type][0]].sections;
while (ptr) { while (ptr) {
if (ptr->section->org < section->org + section->size if (ptr->section->org < section->org + section->size