mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 10:42:07 +00:00
Merge pull request #526 from JL2210/fix-bank-index
Fix indexing of banks array, fixes #525
This commit is contained in:
@@ -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