diff options
Diffstat (limited to 'upb/pb/decoder.c')
-rw-r--r-- | upb/pb/decoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/upb/pb/decoder.c b/upb/pb/decoder.c index 1098e63..d774ebd 100644 --- a/upb/pb/decoder.c +++ b/upb/pb/decoder.c @@ -567,7 +567,8 @@ static int32_t dispatch(upb_pbdecoder *d) { // Lookup tag. Because of packed/non-packed compatibility, we have to // check the wire type against two possibilities. upb_value val; - if (upb_inttable_lookup32(dispatch, fieldnum, &val)) { + if (fieldnum != DISPATCH_ENDMSG && + upb_inttable_lookup32(dispatch, fieldnum, &val)) { uint64_t v = upb_value_getuint64(val); if (wire_type == (v & 0xff)) { d->pc = d->top->base + (v >> 16); |