aboutsummaryrefslogtreecommitdiffstats
path: root/pb_decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'pb_decode.c')
-rw-r--r--pb_decode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pb_decode.c b/pb_decode.c
index df053314..e2888f22 100644
--- a/pb_decode.c
+++ b/pb_decode.c
@@ -349,7 +349,7 @@ bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struc
uint32_t temp;
int tag, wire_type;
if (!pb_decode_varint32(stream, &temp))
- return false;
+ return stream->bytes_left == 0; /* Was it EOF? */
tag = temp >> 3;
wire_type = temp & 7;