From 8ebf1a15fb16b17df0bef227cd902aa9796b60f1 Mon Sep 17 00:00:00 2001 From: DoKM Date: Wed, 14 Jul 2021 09:30:12 +0200 Subject: Fix array out of bounds exception due to me putting math in the wrong order --- .../io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java index 620d3774..05fc4a7e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java @@ -136,7 +136,7 @@ public class TimersOverlay extends TextOverlay { ZonedDateTime currentTimeEST = ZonedDateTime.now(ZoneId.of("America/Atikokan")); - long fetchurIndex = currentTimeEST.getDayOfMonth()-1 % 13; + long fetchurIndex = (currentTimeEST.getDayOfMonth() % 13)-1; if(fetchurIndex < 0) fetchurIndex += 13; icon = FETCHUR_ICONS[(int)fetchurIndex]; -- cgit