mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 05:33:33 +08:00
Fixed #21
This commit is contained in:
@@ -513,7 +513,7 @@ class UAVCAN_EXPORT Array : public ArrayImpl<T, ArrayMode, MaxSize_>
|
||||
{
|
||||
return res_sz;
|
||||
}
|
||||
if ((sz > 0) && ((sz - 1u) > (MaxSize_ - 1u))) // -Werror=type-limits
|
||||
if (static_cast<unsigned>(sz) > MaxSize_)
|
||||
{
|
||||
return -ErrInvalidMarshalData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user