From f271f88c7f3084523a03ca7f47060d6527724796 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 5 Dec 2021 17:59:33 +0100 Subject: [PATCH] Fix MusicChange hook crashing when called BRUH MOMENT BRUH MOMENT PREPARE THE HALL OF SHAME --- src/lua_hooklib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index a72b22b5a..287a185bc 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -1117,7 +1117,7 @@ int LUA_HookMusicChange(const char *oldname, struct MusicChange *param) lua_pushstring(gL, oldname);/* the only constant value */ lua_pushstring(gL, param->newname);/* semi constant */ - for (k = 0; k <= map->numHooks; ++k) + for (k = 0; k < map->numHooks; ++k) { get_hook(&hook, map->ids, k);