Skip to content

Commit

Permalink
Disallow ignorezero in Message field (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxi-box authored Jan 19, 2024
1 parent 3631ca6 commit 2f05a21
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 @@ -1728,7 +1728,7 @@ static void lpb_encode_onefield(lpb_Env *e, const pb_Type *t, const pb_Field *f,
else if (f->repeated)
lpbE_repeated(e, f, idx);
else if (!f->type || !f->type->is_dead)
lpbE_tagfield(e, f, t->is_proto3 && !f->oneof_idx, idx);
lpbE_tagfield(e, f, t->is_proto3 && !f->oneof_idx && f->type_id != PB_Tmessage, idx);
}

static void lpbE_encode(lpb_Env *e, const pb_Type *t, int idx) {
Expand Down

0 comments on commit 2f05a21

Please sign in to comment.