cec: fixed typo in 3557c68d1c9f4ce0191163a4ab48b6c5cec68488 and create a 'broadcast...
authorLars Op den Kamp <lars@opdenkamp.eu>
Sat, 12 Nov 2011 11:37:19 +0000 (12:37 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Sat, 12 Nov 2011 11:37:19 +0000 (12:37 +0100)
src/lib/CECProcessor.cpp

index cc8d86eb471e844345b8c4c0276536072ba4db63..b0bf49f335065dfd9af4479ebf30b1c5b1b23d01 100644 (file)
@@ -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);
 }