From d3d58592f8f6cb8a1d69de83a5bc5f4fa086725a Mon Sep 17 00:00:00 2001 From: Emma Date: Sat, 23 Oct 2021 01:14:07 -0700 Subject: [PATCH] Added implementation to fix indexing of weapon array in cheats. --- src/com/hotmail/kalebmarc/textfighter/main/Cheats.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/hotmail/kalebmarc/textfighter/main/Cheats.java b/src/com/hotmail/kalebmarc/textfighter/main/Cheats.java index 4ecdb042..1abddd92 100644 --- a/src/com/hotmail/kalebmarc/textfighter/main/Cheats.java +++ b/src/com/hotmail/kalebmarc/textfighter/main/Cheats.java @@ -58,7 +58,7 @@ private static void cheatSelect() { Potion.set("Recovery", 5000, false); break; case "weaponstash": - for (int i = 0; i <= Weapon.arrayWeapon.size(); i++) { + for (int i = 0; i < Weapon.arrayWeapon.size(); i++) { Weapon.arrayWeapon.get(i).setAmmo(5000, false); }