From: Lars Op den Kamp Date: Sat, 12 Nov 2011 11:37:19 +0000 (+0100) Subject: cec: fixed typo in 3557c68d1c9f4ce0191163a4ab48b6c5cec68488 and create a 'broadcast... X-Git-Tag: upstream/2.2.0~1^2~45^2~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7871d66e26a265859fe00cf85ee2282a177782b0;p=deb_libcec.git cec: fixed typo in 3557c68d1c9f4ce0191163a4ab48b6c5cec68488 and create a 'broadcast/unregistered' bus device too --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index cc8d86e..b0bf49f 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -57,7 +57,7 @@ CCECProcessor::CCECProcessor(CLibCEC *controller, CAdapterCommunication *serComm m_logicalAddresses.clear(); m_logicalAddresses.set(iLogicalAddress); m_types.clear(); - for (int iPtr = 0; iPtr < 16; iPtr++) + for (int iPtr = 0; iPtr <= 16; iPtr++) m_busDevices[iPtr] = new CCECBusDevice(this, (cec_logical_address) iPtr, iPtr == iLogicalAddress ? iPhysicalAddress : 0); } @@ -659,7 +659,7 @@ void CCECProcessor::ParseCommand(cec_command &command) dataStr.AppendFormat(":%02x", (unsigned int)command.parameters[iPtr]); m_controller->AddLog(CEC_LOG_TRAFFIC, dataStr.c_str()); - if (!m_bMonitor && command.initiator >= CECDEVICE_TV && command.initiator < CECDEVICE_BROADCAST) + if (!m_bMonitor && command.initiator >= CECDEVICE_TV && command.initiator <= CECDEVICE_BROADCAST) m_busDevices[(uint8_t)command.initiator]->HandleCommand(command); }