summaryrefslogtreecommitdiff
path: root/core/upb_msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/upb_msg.h')
-rw-r--r--core/upb_msg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/upb_msg.h b/core/upb_msg.h
index 1318e08..8a3c63f 100644
--- a/core/upb_msg.h
+++ b/core/upb_msg.h
@@ -198,7 +198,7 @@ void upb_msg_recycle(upb_msg **msg, upb_msgdef *msgdef);
// Tests whether the given field is explicitly set, or whether it will return a
// default.
INLINE bool upb_msg_has(upb_msg *msg, upb_fielddef *f) {
- return (msg->data[f->field_index/8] & (1 << (f->field_index % 8))) != 0;
+ return (msg->data[f->set_bit_offset] & f->set_bit_mask) != 0;
}
INLINE upb_value upb_msg_get(upb_msg *msg, upb_fielddef *f) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback