From 79944ff2c856f0d1ecdbc41bdb0a855c4233139a Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Tue, 23 Dec 2025 15:13:28 +0100 Subject: [PATCH] thre --- src/fm95.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fm95.c b/src/fm95.c index 7d87a39..b04c2ff 100644 --- a/src/fm95.c +++ b/src/fm95.c @@ -188,10 +188,11 @@ int run_fm95(const FM95_Config config, FM95_Runtime* runtime) { bool mpx_on = config.options.mpx_on; bool rds_on = config.options.rds_on; + int script_ref = 0; // Load the file - if (luaL_loadfile(L, "/home/user/test.lua") == LUA_OK) { + if (luaL_loadfile(runtime->lua, "/home/user/test.lua") == LUA_OK) { // luaL_ref pops the function from the stack and returns a unique integer ID - int script_ref = luaL_ref(L, LUA_REGISTRYINDEX); + script_ref = luaL_ref(L, LUA_REGISTRYINDEX); } while (to_run) {