diff options
Diffstat (limited to 'pb_decode.c')
-rw-r--r-- | pb_decode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pb_decode.c b/pb_decode.c index bc6df7b9..e2e89a0d 100644 --- a/pb_decode.c +++ b/pb_decode.c @@ -571,7 +571,7 @@ bool checkreturn pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[ } while (pb_field_next(&iter)); /* Fixup if last field was also required. */ - if (PB_HTYPE(last_type) == PB_HTYPE_REQUIRED) + if (PB_HTYPE(last_type) == PB_HTYPE_REQUIRED && iter.current->tag) req_field_count++; /* Check the whole bytes */ |