Azurite
Azurite copied to clipboard
Errors on unidentified key code.
Throws an ArrayIndexOutOfBoundsException when any key that GLFW does not support is pressed.
i.e. when keycode -1
is sent, it's still being used to index into the keystateBitfields
array.
Steps to reproduce
- Open any scene
- On windows, hit a function key without the
fn
key, so that it does the action, such as increasing/decreasing volume/brightness.
What you expected would happen
For the key to be ignored.
What actually happens
An ArrayIndexOutOfBoundsException is thrown
Error logs
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 400
at input.Keyboard.resetKeyDownBit(Keyboard.java:64)
at input.Keyboard.lambda$setupCallbacks$0(Keyboard.java:41)
at org.lwjgl.glfw.GLFWKeyCallbackI.callback(GLFWKeyCallbackI.java:44)
at org.lwjgl.system.JNI.invokeV(Native Method)
at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3397)
at graphics.Window.showWindow(Window.java:205)
at util.Engine.showWindow(Engine.java:55)
at scenes.AudioDemo.main(AudioDemo.java:21)