Fix crash on pressing extra mouse buttons

This commit is contained in:
MatteoS 2015-08-08 16:20:00 +02:00
parent 940e9baa41
commit 110e54e063

View File

@ -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;