diff options
Diffstat (limited to 'pb_decode.c')
-rw-r--r-- | pb_decode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pb_decode.c b/pb_decode.c index 7eda89a4..d0e18ccb 100644 --- a/pb_decode.c +++ b/pb_decode.c @@ -430,11 +430,11 @@ static bool checkreturn decode_callback_field(pb_istream_t *stream, pb_wire_type if (!pb_make_string_substream(stream, &substream)) return false; - while (substream.bytes_left) + do { if (!pCallback->funcs.decode(&substream, iter->pos, arg)) PB_RETURN_ERROR(stream, "callback failed"); - } + } while (substream.bytes_left); pb_close_string_substream(stream, &substream); return true; |