Explicit cast in transport CRC computer

This commit is contained in:
Pavel Kirienko 2014-06-16 11:22:21 +04:00
parent ff7481334a
commit 95cdeff49e

View File

@ -42,7 +42,7 @@ public:
#if UAVCAN_TINY
void add(uint8_t byte)
{
value_ ^= byte << 8;
value_ ^= static_cast<uint16_t>(byte) << 8;
for (uint8_t bit = 8; bit > 0; --bit)
{
if (value_ & 0x8000)