From 0833cf29b3faf16b8b8cd9634b0b7f9e3fa87563 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Thu, 8 Mar 2018 17:14:53 +0000 Subject: Bytes type should return size of stringview --- upb/msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'upb/msg.c') diff --git a/upb/msg.c b/upb/msg.c index 09ae5c8..527587f 100644 --- a/upb/msg.c +++ b/upb/msg.c @@ -64,9 +64,9 @@ static size_t upb_msgval_sizeof(upb_fieldtype_t type) { return 4; case UPB_TYPE_BOOL: return 1; - case UPB_TYPE_BYTES: case UPB_TYPE_MESSAGE: return sizeof(void*); + case UPB_TYPE_BYTES: case UPB_TYPE_STRING: return sizeof(upb_stringview); } -- cgit v1.2.3