From ad5eb6d327754b27652beb7c377d8fd5e1ca8fe2 Mon Sep 17 00:00:00 2001 From: Davide Faconti Date: Thu, 29 Aug 2024 14:40:22 +0200 Subject: [PATCH] Fix issue #13 --- src/ros_parser.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ros_parser.cpp b/src/ros_parser.cpp index 8a1523c..f4cd3c9 100644 --- a/src/ros_parser.cpp +++ b/src/ros_parser.cpp @@ -124,8 +124,7 @@ bool Parser::deserialize(Span buffer, FlatMessage* flat_container bool IS_BLOB = false; // Stop storing it if is NOT a blob and a very large array. - if (array_size > static_cast(_max_array_size) && - field_type.typeID() == BuiltinType::OTHER) + if (array_size > static_cast(_max_array_size)) { if (builtinSize(field_type.typeID()) == 1) { @@ -140,9 +139,8 @@ bool Parser::deserialize(Span buffer, FlatMessage* flat_container entire_message_parse = false; } } - - if (IS_BLOB) // special case. This is a "blob", typically an image, a map, - // pointcloud, etc. + // special case. This is a "blob", typically an image, a map, pointcloud, etc. + if (IS_BLOB) { ExpandVectorIfNecessary(flat_container->blob, blob_index);