Changeset

9786:00f7af0be849

mod_admin_telnet: sttas:show: Use format option that allows float numbers string.format("%d", 0.5) causes an error on Lua 5.3
author Kim Alvefur <zash@zash.se>
date Wed, 16 Jan 2019 14:20:16 +0100
parents 9785:ff88b03c343f
children 9787:6625efab91e2
files plugins/mod_admin_telnet.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Wed Jan 16 13:53:04 2019 +0100
+++ b/plugins/mod_admin_telnet.lua	Wed Jan 16 14:20:16 2019 +0100
@@ -1255,7 +1255,7 @@
 	--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