Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a array out of bounds error, due to a off by one mistake.

  • Loading branch information...
commit 9eccc8df884442846466d37e37df1e67b3217b4b 1 parent e96bae1
Andrew Brampton authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  src/main.cpp
3  src/main.cpp
View
@@ -106,7 +106,7 @@ const std::vector<__u16> & Main::setupUinputMap() {
static std::vector<__u16> uinputCecMap;
if (uinputCecMap.empty()) {
- uinputCecMap.resize(CEC_USER_CONTROL_CODE_MAX, KEY_RESERVED);
+ uinputCecMap.resize(CEC_USER_CONTROL_CODE_MAX + 1, 0);
uinputCecMap[CEC_USER_CONTROL_CODE_SELECT ] = KEY_ENTER;
uinputCecMap[CEC_USER_CONTROL_CODE_UP ] = KEY_UP;
uinputCecMap[CEC_USER_CONTROL_CODE_DOWN ] = KEY_DOWN;
@@ -186,7 +186,6 @@ const std::vector<__u16> & Main::setupUinputMap() {
uinputCecMap[CEC_USER_CONTROL_CODE_F5 ] = 0;
uinputCecMap[CEC_USER_CONTROL_CODE_DATA ] = 0;
uinputCecMap[CEC_USER_CONTROL_CODE_AN_RETURN ] = 0;
- uinputCecMap[CEC_USER_CONTROL_CODE_MAX ] = 0;
}
return uinputCecMap;
Please sign in to comment.
Something went wrong with that request. Please try again.