]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Use math.floor for Lua 5.4 integer division compatibility
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 6 Dec 2025 13:42:00 +0000 (13:42 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 6 Dec 2025 13:42:00 +0000 (13:42 +0000)
commitb4ed7bffe681162fcef340f3c90e3ba006f1992c
tree1c7f904a9267069cf2c17cb94ac8ebc97b3cd500
parent738edf0cb72b43e37671bd37537bfc1065d0058c
[Fix] Use math.floor for Lua 5.4 integer division compatibility

In Lua 5.4, the / operator always returns a float (2/2 = 1.0), while
LuaJIT returns an integer (2/2 = 1). This caused test dependency
registration to fail as tostring(i/2) produced "1.0" instead of "1".
test/functional/lua/limits.lua