From 727d3541a122795b405208242e6fdf7f8b5add07 Mon Sep 17 00:00:00 2001 From: ame Date: Mon, 29 Jun 2026 05:48:58 -0500 Subject: :detatch fix and math.random --- src/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/thread.c') diff --git a/src/thread.c b/src/thread.c index cd2eb5f..f34f314 100644 --- a/src/thread.c +++ b/src/thread.c @@ -213,7 +213,7 @@ int _thread_detach(lua_State* L){ lua_pushstring(L, "_"); lua_gettable(L, 1); struct thread_info* info = lua_touserdata(L, -1); - lua_getmetatable(L, -1); + lua_getmetatable(L, 1); int idx = lua_gettop(L); luaI_tsetnil(L, idx, "__gc"); -- cgit v1.2.3