This commit is contained in:
Pavel Kirienko
2015-04-27 10:31:21 +03:00
parent bfc4b5336c
commit 1b75c48783
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
}