diff options
Diffstat (limited to 'include/perfetto/protozero/proto_decoder.h')
-rw-r--r-- | include/perfetto/protozero/proto_decoder.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/perfetto/protozero/proto_decoder.h b/include/perfetto/protozero/proto_decoder.h index 2210532f3..c27fcadf2 100644 --- a/include/perfetto/protozero/proto_decoder.h +++ b/include/perfetto/protozero/proto_decoder.h @@ -340,7 +340,8 @@ class PERFETTO_EXPORT_COMPONENT TypedProtoDecoderBase : public ProtoDecoder { uint32_t field_id, bool* parse_error_location) const { const Field& field = Get(field_id); - if (field.valid()) { + if (field.valid() && + field.type() == proto_utils::ProtoWireType::kLengthDelimited) { return PackedRepeatedFieldIterator<wire_type, cpp_type>( field.data(), field.size(), parse_error_location); } |