diff --git a/pb.c b/pb.c index c620ee7..32f82f8 100644 --- a/pb.c +++ b/pb.c @@ -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);