summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pb_encode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pb_encode.c b/pb_encode.c
index 9a6ad99f..a8873828 100644
--- a/pb_encode.c
+++ b/pb_encode.c
@@ -268,8 +268,8 @@ bool checkreturn pb_encode_fixed64(pb_ostream_t *stream, const void *value)
bool checkreturn pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, int field_number)
{
- int tag = wiretype | (field_number << 3);
- return pb_encode_varint(stream, (uint64_t)tag);
+ uint64_t tag = wiretype | (field_number << 3);
+ return pb_encode_varint(stream, tag);
}
bool checkreturn pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field)