ref: f996186fae53fa87b1f7a8b3373d91211601d21d
parent: b958820bce7574a509d6990d07d139f366c4fa62
parent: 69a41d8ef9671437a73a3dd73efe5f11922a836c
author: Eldred Habert <[email protected]>
date: Sun Jun 21 08:44:17 EDT 2020
Merge pull request #526 from JL2210/fix-bank-index Fix indexing of banks array, fixes #525
--- a/src/link/output.c
+++ b/src/link/output.c
@@ -88,8 +88,9 @@
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