widget.weather: use math.floor; closes #519

This commit is contained in:
Luca CPZ 2022-10-20 19:38:51 +00:00 committed by GitHub
parent 6cc8c921e9
commit 438dd74810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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