From: popcornmix Date: Fri, 24 Oct 2014 12:22:57 +0000 (+0100) Subject: Fix typo in rejecting invalid keycodes X-Git-Tag: upstream/2.2.0~1^2~1^2~3^2~7^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f1f5731982c4a545a4d561fb7def1014bb648e34;p=deb_libcec.git Fix typo in rejecting invalid keycodes --- diff --git a/src/lib/CECClient.cpp b/src/lib/CECClient.cpp index 85df46d..837214f 100644 --- a/src/lib/CECClient.cpp +++ b/src/lib/CECClient.cpp @@ -995,7 +995,7 @@ void CCECClient::AddKey(bool bSendComboKey /* = false */) void CCECClient::AddKey(const cec_keypress &key) { - if (key.keycode > CEC_USER_CONTROL_CODE_MAX && + if (key.keycode > CEC_USER_CONTROL_CODE_MAX || key.keycode < CEC_USER_CONTROL_CODE_SELECT) { // send back the previous key if there is one