diff --git a/upb/decode.c b/upb/decode.c index 4340a90ecb..8d685a2c90 100644 --- a/upb/decode.c +++ b/upb/decode.c @@ -477,6 +477,7 @@ static bool upb_decode_delimitedfield(upb_decstate *d, upb_decframe *frame, } case UPB_DESCRIPTOR_TYPE_MESSAGE: CHK(val.size <= (size_t)(frame->limit - val.data)); + d->ptr -= val.size; CHK(upb_decode_submsg(d, frame, val.data + val.size, field, 0)); break; default: