mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Explicit cast in transport CRC computer
This commit is contained in:
parent
ff7481334a
commit
95cdeff49e
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user