Code Review
/
apps
/
agl-service-can-low-level.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
6fca8ed
)
Fix callback pointer corruption in proto3 mode (issue #249)
author
Petteri Aimonen
<jpa@git.mail.kapsi.fi>
Thu, 2 Mar 2017 20:14:00 +0000
(22:14 +0200)
committer
Petteri Aimonen
<jpa@git.mail.kapsi.fi>
Thu, 2 Mar 2017 20:21:57 +0000
(22:21 +0200)
pb_decode.c
patch
|
blob
|
history
diff --git
a/pb_decode.c
b/pb_decode.c
index
a8cd61a
..
e2e90ca
100644
(file)
--- a/
pb_decode.c
+++ b/
pb_decode.c
@@
-780,7
+780,7
@@
static void pb_field_set_to_default(pb_field_iter_t *iter)
else if (PB_ATYPE(type) == PB_ATYPE_STATIC)
{
bool init_data = true;
- if (PB_HTYPE(type) == PB_HTYPE_OPTIONAL)
+ if (PB_HTYPE(type) == PB_HTYPE_OPTIONAL
&& iter->pSize != iter->pData
)
{
/* Set has_field to false. Still initialize the optional field
* itself also. */