From 8ea9ac084fefcbc68da6a7b1e14f53288b5ae5ff Mon Sep 17 00:00:00 2001 From: anth64 Date: Fri, 30 Jan 2026 07:24:34 +0100 Subject: [PATCH] fix: swap STK_MOD_RELOAD and STK_MOD_UNLOAD event handlers Cases were reversed during if-else to switch refactoring, causing segfault on module shutdown. Oops... --- src/stk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stk.c b/src/stk.c index d4947f7..743e7a0 100644 --- a/src/stk.c +++ b/src/stk.c @@ -146,12 +146,12 @@ size_t stk_poll(void) case STK_MOD_LOAD: loaded_mod_indices[load_index++] = i; break; - case STK_MOD_UNLOAD: + case STK_MOD_RELOAD: reloaded_mod_file_indices[reload_index] = i; reloaded_mod_indices[reload_index++] = is_mod_loaded(mod_id); break; - case STK_MOD_RELOAD: + case STK_MOD_UNLOAD: unloaded_mod_indices[unload_index++] = is_mod_loaded(mod_id); break;