]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Format floating point number
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 23 Apr 2017 10:10:17 +0000 (11:10 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 23 Apr 2017 10:10:17 +0000 (11:10 +0100)
src/plugins/lua/ratelimit.lua

index 15cbe953c8080576fb7ae2be4a8db4ecc22b76fb..7e1043caf818c6c1d0a3165005614ff646127d19 100644 (file)
@@ -291,7 +291,7 @@ local function check_limits(task, args)
 
             if mult > 0.5 then
               task:insert_result(ratelimit_symbol, mult,
-                rtype .. ':' .. tostring(mult))
+                rtype .. ':' .. string.format('%.2f', mult))
             end
           else
             if bucket > threshold then