From 691a82c3a7ce7e5f43a15f8751cacc792efa339f Mon Sep 17 00:00:00 2001 From: ame Date: Mon, 24 Nov 2025 21:19:57 -0600 Subject: better error and better thread:res return --- src/lua.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lua.c') diff --git a/src/lua.c b/src/lua.c index 45ceeb9..8729229 100644 --- a/src/lua.c +++ b/src/lua.c @@ -272,10 +272,11 @@ void luaI_deepcopy(lua_State* src, lua_State* dest, enum deep_copy_flags flags){ lua_pushlightuserdata(dest, lua_touserdata(src, -1)); break; case LUA_TTHREAD: + sprintf(stderr, "unable to copy LUA_TTHREAD, pushing nil\n"); lua_pushnil(dest); break; default: - printf("unknown type %i vs (old)%i\n",lua_type(src, -1), type); + sprintf(stderr, "unknown type %i vs (old)%i\n",lua_type(src, -1), type); //abort(); lua_pushnil(dest); break; -- cgit v1.2.3