diff options
author | Josh Haberman <jhaberman@gmail.com> | 2014-07-24 09:04:46 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2014-07-24 09:04:46 -0700 |
commit | d493500abc6def6b62d664990ed821e0a836a6cf (patch) | |
tree | 1ceb65e6866ee63612dd73363944a0fc99a65550 /upb/pb/decoder.c | |
parent | 47b5e0968aa0ec47f522ba357c159b2450645806 (diff) |
Sync from Google-internal development.
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); |