]> 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>
Mon, 1 May 2017 13:03:04 +0000 (14:03 +0100)
src/plugins/lua/ratelimit.lua

index 341f9e6585dc06590edf16242948543e3ba1f1ab..dd999d7ba9bcf374b3adcd9eb46db3bb0df94674 100644 (file)
@@ -287,7 +287,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