diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-01-05 10:35:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-05 10:35:21 +0100 |
commit | 07014864d0d8df5a238fd7eb4d6c489e5d75f823 (patch) | |
tree | c5c2b79a2ebe214ce10562ee8c49f02e195875eb | |
parent | 5e6c6f3bb745f8d9be4df938f6cf49dfb552b761 (diff) | |
parent | caf5e921210eb893a95e674b7477d13cc9a34d39 (diff) |
Merge pull request #24778 from Rubonnek/fix-out-of-bounds
Fixed out of bounds axis name access
-rw-r--r-- | main/input_default.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp index 2b7bc3f671..18b4649f4d 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -1084,7 +1084,7 @@ Array InputDefault::get_connected_joypads() { return ret; } -static const char *_buttons[] = { +static const char *_buttons[JOY_BUTTON_MAX] = { "Face Button Bottom", "Face Button Right", "Face Button Left", @@ -1103,7 +1103,7 @@ static const char *_buttons[] = { "DPAD Right" }; -static const char *_axes[] = { +static const char *_axes[JOY_AXIS_MAX] = { "Left Stick X", "Left Stick Y", "Right Stick X", @@ -1111,7 +1111,9 @@ static const char *_axes[] = { "", "", "L2", - "R2" + "R2", + "", + "" }; String InputDefault::get_joy_button_string(int p_button) { |