From 6fea51cba61af2ed74de397e8b6b53b426575f88 Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Tue, 31 Dec 2024 13:17:15 -0500 Subject: [PATCH] Fix missing event count increment during mod loading --- librecomp/src/mods.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/librecomp/src/mods.cpp b/librecomp/src/mods.cpp index 4912c5b..2b1a9b5 100644 --- a/librecomp/src/mods.cpp +++ b/librecomp/src/mods.cpp @@ -1007,6 +1007,9 @@ recomp::mods::CodeModLoadError recomp::mods::ModContext::load_mod_code(uint8_t* .do_break = do_break, .reference_section_addresses = section_addresses, }; + + // Allocate the event indices used by the mod. + num_events += mod.num_events(); // Copy the mod's binary into the recompiler context so it can be analyzed during code loading. // TODO move it instead, right now the move can't be done because of a signedness difference in the types.