From 29cf284089d543408d726440a3f1acaecdf73636 Mon Sep 17 00:00:00 2001 From: Roberto I Date: Tue, 7 Apr 2026 13:42:34 -0300 Subject: Avoid macros luaL_loadbuffer and luaL_loadfile Use luaL_loadbufferx and luaL_loadfilex instead, being explicit about whether to accept binary chunks. --- ldblib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ldblib.c') diff --git a/ldblib.c b/ldblib.c index c7b74812..051327cc 100644 --- a/ldblib.c +++ b/ldblib.c @@ -427,7 +427,7 @@ static int db_debug (lua_State *L) { if (fgets(buffer, sizeof(buffer), stdin) == NULL || strcmp(buffer, "cont\n") == 0) return 0; - if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") || + if (luaL_loadbufferx(L, buffer, strlen(buffer), "=(debug command)", "t") || lua_pcall(L, 0, 0, 0)) lua_writestringerror("%s\n", luaL_tolstring(L, -1, NULL)); lua_settop(L, 0); /* remove eventual returns */ -- cgit v1.2.3-55-g6feb