From 438dd7481026519f1e924a2b3087e7cda559df57 Mon Sep 17 00:00:00 2001 From: Luca CPZ <1777696+lcpz@users.noreply.github.com> Date: Thu, 20 Oct 2022 19:38:51 +0000 Subject: [PATCH] widget.weather: use math.floor; closes #519 --- widget/weather.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/weather.lua b/widget/weather.lua index c683d42..6937ca3 100644 --- a/widget/weather.lua +++ b/widget/weather.lua @@ -94,7 +94,7 @@ local function factory(args) if not err and type(weather_now) == "table" and tonumber(weather_now["cod"]) == 200 then weather.notification_text = "" - for i = 1, weather_now["cnt"], weather_now["cnt"]//cnt do + for i = 1, weather_now["cnt"], math.floor(weather_now["cnt"] / cnt) do weather.notification_text = weather.notification_text .. notification_text_fun(weather_now["list"][i]) if i < weather_now["cnt"] then