From 110e54e06349cc9502c32c344efcec333a97176e Mon Sep 17 00:00:00 2001 From: MatteoS Date: Sat, 8 Aug 2015 16:20:00 +0200 Subject: [PATCH] Fix crash on pressing extra mouse buttons --- src/org/newdawn/slick/Input.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/newdawn/slick/Input.java b/src/org/newdawn/slick/Input.java index 1066ca34..c74eff95 100644 --- a/src/org/newdawn/slick/Input.java +++ b/src/org/newdawn/slick/Input.java @@ -1233,7 +1233,7 @@ public class Input { } while (Mouse.next()) { - if (Mouse.getEventButton() >= 0) { + if (Mouse.getEventButton() >= 0 && Mouse.getEventButton() < mousePressed.length) { if (Mouse.getEventButtonState()) { consumed = false; mousePressed[Mouse.getEventButton()] = true;