summaryrefslogtreecommitdiffstats
path: root/pb_encode.c
diff options
context:
space:
mode:
Diffstat (limited to 'pb_encode.c')
-rw-r--r--pb_encode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pb_encode.c b/pb_encode.c
index 317e31ef..995eb3de 100644
--- a/pb_encode.c
+++ b/pb_encode.c
@@ -376,6 +376,7 @@ bool checkreturn pb_enc_submessage(pb_ostream_t *stream, const pb_field_t *field
status = pb_encode(&substream, (pb_field_t*)field->ptr, src);
stream->bytes_written += substream.bytes_written;
+ stream->state = substream.state;
if (substream.bytes_written != size)
return false;