diff options
Diffstat (limited to 'core/upb_msg.c')
-rw-r--r-- | core/upb_msg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/upb_msg.c b/core/upb_msg.c index 05ee1e9..9dfbea4 100644 --- a/core/upb_msg.c +++ b/core/upb_msg.c @@ -142,7 +142,7 @@ void upb_msg_recycle(upb_msg **_msg, upb_msgdef *msgdef) { } INLINE void upb_msg_sethas(upb_msg *msg, upb_fielddef *f) { - msg->data[f->field_index/8] |= (1 << (f->field_index % 8)); + msg->data[f->set_bit_offset] |= f->set_bit_mask; } static upb_valueptr upb_msg_getappendptr(upb_msg *msg, upb_fielddef *f) { |