From 41a23ca371560525492de84243603cc0fff32f3c Mon Sep 17 00:00:00 2001 From: thefiddler Date: Thu, 30 Jan 2014 17:36:59 +0100 Subject: [PATCH] [Input] Fixed off-by-one error in internal max axes/buttons --- Source/OpenTK/Input/JoystickState.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Input/JoystickState.cs b/Source/OpenTK/Input/JoystickState.cs index 8005b096..aad66590 100644 --- a/Source/OpenTK/Input/JoystickState.cs +++ b/Source/OpenTK/Input/JoystickState.cs @@ -40,8 +40,8 @@ namespace OpenTK.Input { // If we ever add more values to JoystickAxis or JoystickButton // then we'll need to increase these limits. - internal const int MaxAxes = (int)JoystickAxis.Last; - internal const int MaxButtons = (int)JoystickButton.Last; + internal const int MaxAxes = (int)JoystickAxis.Last + 1; + internal const int MaxButtons = (int)JoystickButton.Last + 1; const float ConversionFactor = 1.0f / (short.MaxValue + 0.5f);