diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2019-09-04 12:17:33 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2019-09-04 12:17:33 -0700 |
commit | 29c30e9cb3fd59c5998310f0ad01bcabd295656b (patch) | |
tree | d8eacc498ff536ba1eaed7405a4b71e1ddc1b2c4 | |
parent | ca4605b3af559d0600e8102dd4255d4a6261720c (diff) |
Fixed cache to properly insert by msgdef key.
-rw-r--r-- | upb/pb/compile_decoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/upb/pb/compile_decoder.c b/upb/pb/compile_decoder.c index c39951c..f5c7d65 100644 --- a/upb/pb/compile_decoder.c +++ b/upb/pb/compile_decoder.c @@ -909,7 +909,8 @@ const upb_pbdecodermethod *upb_pbcodecache_get(upb_pbcodecache *c, g = upb_value_getconstptr(v); } else { g = mgroup_new(h, c->lazy); - upb_inttable_push(&c->groups, upb_value_constptr(g)); + ok = upb_inttable_insertptr(&c->groups, md, upb_value_constptr(g)); + UPB_ASSERT(ok); } ok = upb_inttable_lookupptr(&g->methods, h, &v); |