Skip to content
Snippets Groups Projects
Commit e1b8a555 authored by Petteri Aimonen's avatar Petteri Aimonen
Browse files

Fix additional bug with empty message types.

pb_field_next() would access past the fields array.
parent 60109c0b
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment