From a2decedbd81ef0be30b5327f7395c02dceee2a30 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 20 Aug 2017 11:44:01 +0200 Subject: [PATCH] rcinput: fix getKeyName for RC_none case Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6ca45cb5faf8a1ab9473c3e86d42ff4dbaa7ef95 Author: Stefan Seyfried Date: 2017-08-20 (Sun, 20 Aug 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/rcinput.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 83052f94a..f0ddc70eb 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1678,9 +1678,14 @@ const char * CRCInput::getSpecialKeyName(const unsigned int key) std::string CRCInput::getKeyName(const unsigned int key) { - std::string res(getKeyNameC(key & ~RC_Repeat)); - if ((key & RC_Repeat) && res != "unknown") - res += " (long)"; + std::string res; + if (key > RC_MaxRC) + res = getKeyNameC(key); /* will only resolve RC_nokey or "unknown" */ + else { + res = (getKeyNameC(key & ~RC_Repeat)); + if ((key & RC_Repeat) && res != "unknown") + res += " (long)"; + } return res; }