Skip to content

Commit

Permalink
Fix issue #13
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide authored Aug 29, 2024
1 parent 648a50a commit ad5eb6d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/ros_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ bool Parser::deserialize(Span<const uint8_t> 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<int32_t>(_max_array_size) &&
field_type.typeID() == BuiltinType::OTHER)
if (array_size > static_cast<int32_t>(_max_array_size))
{
if (builtinSize(field_type.typeID()) == 1)
{
Expand All @@ -140,9 +139,8 @@ bool Parser::deserialize(Span<const uint8_t> 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);

Expand Down

0 comments on commit ad5eb6d

Please sign in to comment.