From: Lars Op den Kamp Date: Thu, 10 Nov 2011 17:30:00 +0000 (+0100) Subject: cec: fix parameter parsing in SetVendorId() X-Git-Tag: upstream/2.2.0~1^2~86 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bae71306a2b4f2bc684d418a3d15c78892ae2b2d;p=deb_libcec.git cec: fix parameter parsing in SetVendorId() --- diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index fd7d003..2a5b375 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -409,8 +409,8 @@ void CCECCommandHandler::SetVendorId(const cec_command &command) return; } - uint64_t iVendorId = ((uint64_t)command.parameters[0] << 3) + - ((uint64_t)command.parameters[1] << 2) + + uint64_t iVendorId = ((uint64_t)command.parameters[0] << 16) + + ((uint64_t)command.parameters[1] << 8) + (uint64_t)command.parameters[2]; CCECBusDevice *device = GetDevice((cec_logical_address) command.initiator);