pwatts6060 / SuppliesTrackerExternal

Tracks supplies, ammo, and weapon charges
BSD 2-Clause "Simplified" License
9 stars 13 forks source link

IOOB exception when drinking PoH pool #86

Closed Infinitay closed 2 months ago

Infinitay commented 10 months ago

Whenever I drink from the ornate pool in my PoH I get the following exception:

2023-11-21 06:22:41 EST [Client] WARN  n.runelite.client.eventbus.EventBus - Uncaught exception in event subscriber
java.lang.ArrayIndexOutOfBoundsException: Index 56 out of bounds for length 13
    at com.suppliestracker.SuppliesTrackerPlugin.onMenuOptionClicked(SuppliesTrackerPlugin.java:1028)
    at net.runelite.client.eventbus.EventBus$Subscriber.invoke(EventBus.java:70)
    at net.runelite.client.eventbus.EventBus.post(EventBus.java:223)
    at net.runelite.client.callback.Hooks.post(Hooks.java:194)
    at px.kx(px.java:40847)
    at client.pc(client.java:13268)
    at client.kl(client.java:49078)
    at client.hm(client.java:3516)
    at client.bj(client.java:1161)
    at bm.an(bm.java:394)
    at bm.fr(bm.java)
    at bm.run(bm.java:20059)
    at java.base/java.lang.Thread.run(Thread.java:829)
pwatts6060 commented 2 months ago

Thank you for this, cause of the drink option it got handled in code similar to eating/drinking food in inventory. I'll figure out how to add a check to restrict this code to inventory clicks to fix the issue. edit: Will be fixed in the update