From 719e1d98d61aa0614db86a9cab79402b304c4852 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 18 Oct 2026 14:31:05 +0200 Subject: fix(weather): moon_icon survives integer overflow phase * 28 wrapped for math.maxinteger; multiply as a float so the result goes through the non-finite check. Co-Authored-By: Claude Sonnet 5.5 --- lib/weather.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/weather.lua') diff --git a/lib/weather.lua b/lib/weather.lua index d4b1460..56cf92b 100644 --- a/lib/weather.lua +++ b/lib/weather.lua @@ -142,7 +142,7 @@ end -- One of the 28 Nerd Font moon glyphs, U+E38D (new) to U+E3A8, in phase order. function M.moon_icon(phase) if type(phase) ~= 'number' then return M.ICON.unknown end - local r = round(phase * 28) + local r = round(phase * 28.0) if not r then return M.ICON.unknown end return utf8.char(0xE38D + r % 28) end -- cgit v1.2.3