0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-26 20:33:53 +01:00
This commit is contained in:
2025-12-24 23:24:32 +01:00
parent 4d2f157ea4
commit f1dac6e51e

View File

@@ -8,6 +8,7 @@ static uint8_t unload_refs[33] = {LUA_REFNIL};
static uint8_t lua_reload_scheduled = 0;
int lua_reload_command(lua_State* localL) {
(void)localL;
lua_reload_scheduled = 1;
return 0;
}
@@ -694,12 +695,10 @@ void reload_lua() {
}
} else lua_pop(L, 1);
if (unload_refs) {
for (int i = 1; i < *unload_refs; i++) {
luaL_unref(L, LUA_REGISTRYINDEX, unload_refs[i]);
}
*unload_refs = 1;
for (int i = 1; i < *unload_refs; i++) {
luaL_unref(L, LUA_REGISTRYINDEX, unload_refs[i]);
}
*unload_refs = 1;
if (L) {
lua_close(L);