mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
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:
committed by
James R Larrowe
parent
b958820bce
commit
69a41d8ef9
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user