diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2018-11-10 14:18:37 +0200 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2018-11-10 14:18:37 +0200 |
commit | e2f082fadde5142b7d300868c37fbe62293c3641 (patch) | |
tree | 636d14dc18fbba4c4a8e743abd53e6023186be8a /pb_encode.c | |
parent | 04cd1f94cc513b4cb3eac924c74039ccc05a944b (diff) | |
parent | 3626b5c40e2457629ac60a563dde523be7c10bb4 (diff) | |
download | nanopb-c-e2f082fadde5142b7d300868c37fbe62293c3641.tar.gz |
Merge 'master' into maintenance_0.3
A bit of a mess, should have done the 0.3.9.2 release from this branch instead.
Oh well, doesn't change anything.
Diffstat (limited to 'pb_encode.c')
-rw-r--r-- | pb_encode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pb_encode.c b/pb_encode.c index 089172c..d0129e6 100644 --- a/pb_encode.c +++ b/pb_encode.c @@ -232,7 +232,7 @@ static bool pb_check_proto3_default_value(const pb_field_t *field, const void *p /* Oneof fields */ return *(const pb_size_t*)pSize == 0; } - else if (PB_HTYPE(type) == PB_HTYPE_OPTIONAL && field->size_offset) + else if (PB_HTYPE(type) == PB_HTYPE_OPTIONAL && field->size_offset != 0) { /* Proto2 optional fields inside proto3 submessage */ return *(const bool*)pSize == false; |