Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-14 06:13:09 +00:00

zapret-lib: return 0 if #val refers to non-string and non-table type

This commit is contained in:
bol-van
2025-12-10 10:49:46 +03:00
parent 7de0995d4a
commit 5c05c10f83

View File

@@ -130,7 +130,8 @@ function apply_arg_prefix(desync)
for a,v in pairs(desync.arg) do
local c = string.sub(v,1,1)
if c=='#' then
desync.arg[a] = #blob(desync,string.sub(v,2))
local blb = blob(desync,string.sub(v,2))
desync.arg[a] = (type(blb)=='string' or type(blb)=='table') and #blb or 0
elseif c=='%' then
desync.arg[a] = blob(desync,string.sub(v,2))
elseif c=='\\' then