Skip to content

Commit

Permalink
fix decode error when packed fields are not packed
Browse files Browse the repository at this point in the history
  • Loading branch information
starwing committed Nov 19, 2018
1 parent 1d7625c commit a1d6c15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ static void lpbD_map(lpb_Env *e, pb_Field *f) {
static void lpbD_repeated(lpb_Env *e, pb_Field *f, uint32_t tag) {
lua_State *L = e->L;
lpb_fetchtable(e, f, NULL);
if (f->packed) {
if (f->packed && pb_gettype(tag) == PB_TBYTES) {
int len = lua_rawlen(L, -1);
lpb_SliceEx p, *s = e->s;
lpb_readbytes(L, s, &p);
Expand Down

0 comments on commit a1d6c15

Please sign in to comment.