From a5ccaee8651c3922519ecac6df32faa65fee51a9 Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Tue, 28 Jan 2020 01:35:56 +0100 Subject: [PATCH] graceful fix array bound checks (#2290) --- .../java/net/runelite/client/util/Graceful.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/util/Graceful.java b/runelite-client/src/main/java/net/runelite/client/util/Graceful.java index ed4ee3cf7f..c4f6710163 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/Graceful.java +++ b/runelite-client/src/main/java/net/runelite/client/util/Graceful.java @@ -129,7 +129,7 @@ public enum Graceful public static boolean hasHood(final Item[] items) { - if (items.length < EquipmentInventorySlot.HEAD.getSlotIdx()) + if (items.length <= EquipmentInventorySlot.HEAD.getSlotIdx()) { return false; } @@ -139,7 +139,7 @@ public enum Graceful public static boolean hasTop(final Item[] items) { - if (items.length < EquipmentInventorySlot.BODY.getSlotIdx()) + if (items.length <= EquipmentInventorySlot.BODY.getSlotIdx()) { return false; } @@ -149,7 +149,7 @@ public enum Graceful public static boolean hasLegs(final Item[] items) { - if (items.length < EquipmentInventorySlot.LEGS.getSlotIdx()) + if (items.length <= EquipmentInventorySlot.LEGS.getSlotIdx()) { return false; } @@ -159,7 +159,7 @@ public enum Graceful public static boolean hasGloves(final Item[] items) { - if (items.length < EquipmentInventorySlot.GLOVES.getSlotIdx()) + if (items.length <= EquipmentInventorySlot.GLOVES.getSlotIdx()) { return false; } @@ -169,7 +169,7 @@ public enum Graceful public static boolean hasBoots(final Item[] items) { - if (items.length < EquipmentInventorySlot.BOOTS.getSlotIdx()) + if (items.length <= EquipmentInventorySlot.BOOTS.getSlotIdx()) { return false; } @@ -179,7 +179,7 @@ public enum Graceful public static boolean hasCape(final Item[] items) { - if (items.length < EquipmentInventorySlot.CAPE.getSlotIdx()) + if (items.length <= EquipmentInventorySlot.CAPE.getSlotIdx()) { return false; } @@ -189,7 +189,7 @@ public enum Graceful public static boolean hasFullSet(final Item[] items) { - if (items.length < EquipmentInventorySlot.BOOTS.getSlotIdx()) + if (items.length <= EquipmentInventorySlot.BOOTS.getSlotIdx()) { return false; }