Fix issue where functions that were regenerated for hooking use the wrong index when triggering events (#112)
Some checks failed
validate / ubuntu (arm64, Debug) (push) Has been cancelled
validate / ubuntu (arm64, Release) (push) Has been cancelled
validate / ubuntu (x64, Debug) (push) Has been cancelled
validate / ubuntu (x64, Release) (push) Has been cancelled
validate / windows (x64, Debug) (push) Has been cancelled
validate / windows (x64, Release) (push) Has been cancelled
validate / macos (arm64, Debug) (push) Has been cancelled
validate / macos (arm64, Release) (push) Has been cancelled
validate / macos (x64, Debug) (push) Has been cancelled
validate / macos (x64, Release) (push) Has been cancelled

This commit is contained in:
Wiseguy 2025-05-03 02:45:08 -04:00 committed by GitHub
parent 327c34db2d
commit c5e268aa0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1290,7 +1290,13 @@ N64Recomp::Context context_from_regenerated_list(const RegeneratedList& regenlis
reloc_out.address = reloc_in.section_offset + section_out.ram_addr;
reloc_out.target_section_offset = reloc_in.target_section_offset;
reloc_out.symbol_index = 0; // Unused for live recompilation.
if (reloc_in.target_section == N64Recomp::SectionEvent) {
// Symbol index holds the event index for event reference symbols.
reloc_out.symbol_index = reloc_in.target_section_offset;
}
else {
reloc_out.symbol_index = 0; // Unused for live recompilation.
}
reloc_out.target_section = reloc_in.target_section;
reloc_out.type = static_cast<N64Recomp::RelocType>(reloc_in.type);
reloc_out.reference_symbol = true;