diff options
author | DoKM <mcazzyman@gmail.com> | 2021-07-14 09:30:12 +0200 |
---|---|---|
committer | DoKM <mcazzyman@gmail.com> | 2021-07-14 09:30:12 +0200 |
commit | 8ebf1a15fb16b17df0bef227cd902aa9796b60f1 (patch) | |
tree | 24a712dfca45faaa65c00be69d9b674d1027620b /src/main | |
parent | be153178cb08229809a82c93e083a5f9572aa26b (diff) | |
download | NotEnoughUpdates-8ebf1a15fb16b17df0bef227cd902aa9796b60f1.tar.gz NotEnoughUpdates-8ebf1a15fb16b17df0bef227cd902aa9796b60f1.tar.bz2 NotEnoughUpdates-8ebf1a15fb16b17df0bef227cd902aa9796b60f1.zip |
Fix array out of bounds exception
due to me putting math in the wrong order
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java | 2 |
1 files changed, 1 insertions, 1 deletions
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]; |