GDTR list integrity check (debug builds only)

This commit is contained in:
Pavel Kirienko 2014-04-20 21:36:01 +04:00
parent 5cd0aff0d3
commit afc56cf87b

View File

@ -103,7 +103,7 @@ GlobalDataTypeRegistry::RegistResult GlobalDataTypeRegistry::registImpl(Entry* d
#if UAVCAN_DEBUG
{ // List integrity check
const unsigned len_after = list->getLength();
if (len_before >= len_after)
if ((len_before + 1) != len_after)
{
assert(0);
std::abort();