diff --git a/libuavcan/src/node/uc_global_data_type_registry.cpp b/libuavcan/src/node/uc_global_data_type_registry.cpp index fdf0b94921..206815c174 100644 --- a/libuavcan/src/node/uc_global_data_type_registry.cpp +++ b/libuavcan/src/node/uc_global_data_type_registry.cpp @@ -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();