aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-01-16 14:20:16 +0100
committerKim Alvefur <zash@zash.se>2019-01-16 14:20:16 +0100
commitb2c3b2f740d777f1e04df40494f2be0637f946a6 (patch)
treedce49c5a7c8754895adb0d50f4b8b36a8dbab346
parent3e30870220e8c617cda3a06b1c9d9054b346283c (diff)
downloadprosody-b2c3b2f740d777f1e04df40494f2be0637f946a6.tar.gz
prosody-b2c3b2f740d777f1e04df40494f2be0637f946a6.zip
mod_admin_telnet: sttas:show: Use format option that allows float numbers
string.format("%d", 0.5) causes an error on Lua 5.3
-rw-r--r--plugins/mod_admin_telnet.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 5ce504f8..7fae8983 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -1255,7 +1255,7 @@ local function format_stat(type, value, ref_value)
--do return tostring(value) end
if type == "duration" then
if ref_value < 0.001 then
- return ("%d µs"):format(value*1000000);
+ return ("%g µs"):format(value*1000000);
elseif ref_value < 0.9 then
return ("%0.2f ms"):format(value*1000);
end