From 04f6599ad750e8381626a6e92e05448ceab32732 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 25 Jan 2024 11:54:36 +0000 Subject: [PATCH] [Minor] Add fail-safety --- lualib/lua_redis.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua index edaae9443..818d955e9 100644 --- a/lualib/lua_redis.lua +++ b/lualib/lua_redis.lua @@ -1290,7 +1290,7 @@ local function add_redis_script(script, redis_params, caller_level, maybe_filena if not caller_level then caller_level = 2 end - local caller = debug.getinfo(caller_level) + local caller = debug.getinfo(caller_level) or debug.getinfo(caller_level - 1) or E local new_script = { caller = caller, -- 2.39.5