From 448fe0226b469df9f8a109a9840afa00bc59b48c Mon Sep 17 00:00:00 2001 From: Funami580 Date: Fri, 26 Nov 2021 17:15:50 +0100 Subject: osc: fix cache displaying 60s in some cases It was caused by string.format rounding e.g. 59.9 to 60. --- player/lua/osc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 62f8245995..595dfc2521 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -2095,10 +2095,10 @@ function osc_init() dmx_cache = state.dmx_cache end local min = math.floor(dmx_cache / 60) - local sec = dmx_cache % 60 + local sec = math.floor(dmx_cache % 60) -- don't round e.g. 59.9 to 60 return "Cache: " .. (min > 0 and string.format("%sm%02.0fs", min, sec) or - string.format("%3.0fs", dmx_cache)) + string.format("%3.0fs", sec)) end -- volume -- cgit v1.2.3