Fix indexing of banks array

When ROMX bank 1 is given, the banks array is indexed with an index
of 1 rather than an index of zero.
This commit is contained in:
James Larrowe
2020-06-15 22:45:29 -04:00
committed by James R Larrowe
parent b958820bce
commit 69a41d8ef9

View File

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