return;
}
else {
+#if LUA_VERSION_NUM >= 504
+ lua_settop(L, -2);
+#endif
if (lua_type (L, -1) != LUA_TFUNCTION) {
msg_warn_config ("lua script must return "
"function and not %s",
lua_tostring (L, -1));
}
else {
+#if LUA_VERSION_NUM >= 504
+ lua_settop(L, -2);
+#endif
if (lua_type (L, -1) != LUA_TTABLE) {
msg_err_config ("lua stat must return "
"table and not %s",
static gint
lua_do_resume_full(lua_State *L, gint narg, const gchar *loc) {
+#if LUA_VERSION_NUM >= 504
+ int nres;
+#endif
msg_debug_lua_threads ("%s: lua_do_resume_full", loc);
#if LUA_VERSION_NUM < 502
return lua_resume(L, narg);
#else
#if LUA_VERSION_NUM >= 504
- return lua_resume (L, NULL, narg, NULL);
+ return lua_resume (L, NULL, narg, &nres);
#else
return lua_resume (L, NULL, narg);
#endif
fuzzy_module_ctx->enabled = FALSE;
}
else {
+#if LUA_VERSION_NUM >= 504
+ lua_settop(L, -2);
+#endif
if (lua_type (L, -1) != LUA_TTABLE) {
msg_err_config ("lua fuzzy must return "
"table and not %s",
local lines = html_text_part:get_lines_count()
if lines > 0 and lines < 2 then
task:insert_result('HFILTER_URL_ONELINE', 1.00,
- string.format('html:%d:%d', sc, lines))
+ string.format('html:%d:%d', math.floor(sc), lines))
end
end
end
local lines = plain_text_part:get_lines_count()
if lines > 0 and lines < 2 then
task:insert_result('HFILTER_URL_ONELINE', 1.00,
- string.format('plain:%d:%d', rel, lines))
+ string.format('plain:%d:%d', math.floor(rel), lines))
end
end
end
if local_mod.remove then
remove[local_mod.header] = local_mod.remove
end
- add[local_mod.header] = string.rep(local_mod.char, score)
+ add[local_mod.header] = string.rep(local_mod.char, math.floor(score))
end
local function spam_header (class, name, value, remove_v)