aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;