mirror of
https://github.com/N64Recomp/N64ModernRuntime.git
synced 2025-10-30 08:02:29 +00:00
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
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:
parent
327c34db2d
commit
c5e268aa0f
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue