diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-09-27 12:16:35 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-27 04:16:35 +0200 |
commit | c231bdc6e3079a8455b9b7c4173528c1c1ecf42e (patch) | |
tree | 27ee80d258b1d95eee93acc76caa75e3de18705c /src/main | |
parent | 29bc3371a62a74d2eab4fe9b6d5c820d52dbbac4 (diff) | |
download | NotEnoughUpdates-c231bdc6e3079a8455b9b7c4173528c1c1ecf42e.tar.gz NotEnoughUpdates-c231bdc6e3079a8455b9b7c4173528c1c1ecf42e.tar.bz2 NotEnoughUpdates-c231bdc6e3079a8455b9b7c4173528c1c1ecf42e.zip |
the people in #general said this would fix a crash (#317)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index dbff2be2..14078069 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1460,7 +1460,7 @@ public class NEUOverlay extends Gui { if (index < getSlotsXSize() * getSlotsYSize()) { int actualIndex = index + getSlotsXSize() * getSlotsYSize() * page; List<JsonObject> searchedItems = getSearchedItems(); - if (actualIndex < searchedItems.size()) { + if (0 <= actualIndex && actualIndex < searchedItems.size()) { return searchedItems.get(actualIndex); } else { return null; |