Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Switch alltypes.proto to use the new .options file mechanism.
[apps/agl-service-can-low-level.git]
/
pb_decode.c
diff --git
a/pb_decode.c
b/pb_decode.c
index
e2e89a0
..
fba8f64
100644
(file)
--- a/
pb_decode.c
+++ b/
pb_decode.c
@@
-312,6
+312,9
@@
static bool pb_field_next(pb_field_iterator_t *iter)
if (PB_HTYPE(iter->current->type) == PB_HTYPE_REQUIRED)
iter->required_field_index++;
+ if (iter->current->tag == 0)
+ return false; /* Only happens with empty message types */
+
iter->current++;
iter->field_index++;
if (iter->current->tag == 0)