From d493500abc6def6b62d664990ed821e0a836a6cf Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Thu, 24 Jul 2014 09:04:46 -0700 Subject: Sync from Google-internal development. --- upb/pb/decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'upb/pb/decoder.c') 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); -- cgit v1.2.3