diff options
author | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-11 19:22:36 +0000 |
---|---|---|
committer | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-11 19:22:36 +0000 |
commit | 6dfba365b00175eae7e8b83aaf5d29ce190fd9eb (patch) | |
tree | f7908f61cb8606a281aa709d187f3b8329385821 /pb_decode.c | |
parent | 09f92bafa59460ea4597c557e469e982386c9e3b (diff) |
Documenting and improving stream behaviour
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@954 e3a754e5-d11d-0410-8d38-ebb782a927b9
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 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; |