aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2022-09-27 12:16:35 +1000
committerGitHub <noreply@github.com>2022-09-27 04:16:35 +0200
commitc231bdc6e3079a8455b9b7c4173528c1c1ecf42e (patch)
tree27ee80d258b1d95eee93acc76caa75e3de18705c
parent29bc3371a62a74d2eab4fe9b6d5c820d52dbbac4 (diff)
downloadNotEnoughUpdates-c231bdc6e3079a8455b9b7c4173528c1c1ecf42e.tar.gz
NotEnoughUpdates-c231bdc6e3079a8455b9b7c4173528c1c1ecf42e.tar.bz2
NotEnoughUpdates-c231bdc6e3079a8455b9b7c4173528c1c1ecf42e.zip
the people in #general said this would fix a crash (#317)
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java2
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;