repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
700c1ea
)
cec: osd string is 13 chars max. don't send more
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Sun, 6 Nov 2011 11:38:39 +0000
(12:38 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Sun, 6 Nov 2011 11:38:39 +0000
(12:38 +0100)
src/lib/devices/CECBusDevice.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/devices/CECBusDevice.cpp
b/src/lib/devices/CECBusDevice.cpp
index a4580594432997fc45aab30f2699812f1ed82ee5..3d1a7cda80c9da25a4b1a4ed00978ff1707bf023 100644
(file)
--- a/
src/lib/devices/CECBusDevice.cpp
+++ b/
src/lib/devices/CECBusDevice.cpp
@@
-272,7
+272,10
@@
bool CCECBusDevice::SetOSDString(cec_display_control duration, const char *strMe
cec_command::format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_SET_OSD_STRING);
command.parameters.push_back((uint8_t)duration);
- for (unsigned int iPtr = 0; iPtr < strlen(strMessage); iPtr++)
+ unsigned int iLen = strlen(strMessage);
+ if (iLen > 13) iLen = 13;
+
+ for (unsigned int iPtr = 0; iPtr < iLen; iPtr++)
command.parameters.push_back(strMessage[iPtr]);
return m_processor->Transmit(command);