lua: apply patch for "Parameter 'what' of 'debug.getinfo' cannot start with '>'"

<https://lua.org/bugs.html#5.4.2-2>
This commit is contained in:
sfan5 2024-06-24 17:39:09 +02:00
parent 7362ecb3b4
commit 77ac20a66b

View File

@ -101,6 +101,7 @@ static int db_getinfo (lua_State *L) {
int arg;
lua_State *L1 = getthread(L, &arg);
const char *options = luaL_optstring(L, arg+2, "flnSu");
luaL_argcheck(L, options[0] != '>', arg + 2, "invalid option '>'");
if (lua_isnumber(L, arg+1)) {
if (!lua_getstack(L1, (int)lua_tointeger(L, arg+1), &ar)) {
lua_pushnil(L); /* level out of range */