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

nfqws2, zapret-lib: always treat blobs, % and # as string

This commit is contained in:
bol-van
2026-02-17 19:21:44 +03:00
parent 5ced6811c8
commit 1b1c8ddb38
2 changed files with 7 additions and 2 deletions

View File

@@ -1248,6 +1248,7 @@ void lua_push_blob(lua_State *L, int idx_desync, const char *blob)
lua_pop(L,1);
lua_getglobal(L, blob);
}
lua_tostring(L,-1);
}
void lua_pushf_blob(lua_State *L, int idx_desync, const char *field, const char *blob)
{
@@ -1779,7 +1780,10 @@ void lua_pushf_args(lua_State *L, const struct str2_list_head *args, int idx_des
lua_push_blob(L, idx_desync, val+1);
lua_Integer len = lua_rawlen(L, -1);
lua_pop(L,1);
lua_pushf_int(L, var, len);
lua_pushstring(L, var);
lua_pushinteger(L, len);
lua_tostring(L,-1); // force string type in arg
lua_rawset(L,-3);
}
else
lua_pushf_str(L, var, val);