diff options
author | Bo Yang <teboring@google.com> | 2017-02-06 11:34:50 -0800 |
---|---|---|
committer | Bo Yang <teboring@google.com> | 2017-02-06 11:34:50 -0800 |
commit | 0168f28daf05a07f4d53b045e1a2a398fcd33c8f (patch) | |
tree | 3e2778705ef0d7b16b925e9d88071b149a6aefc0 /upb/pb | |
parent | 73a48a46f83402669e654e8c0d0c297e2c5390a0 (diff) |
Bug fix: When encoding, negative int32 values should be padded to int64 in order to be wire compatible
Diffstat (limited to 'upb/pb')
-rw-r--r-- | upb/pb/encoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/upb/pb/encoder.c b/upb/pb/encoder.c index 780425d..b457867 100644 --- a/upb/pb/encoder.c +++ b/upb/pb/encoder.c @@ -411,7 +411,7 @@ static size_t encode_strbuf(void *c, const void *hd, const char *buf, T(double, double, dbl2uint64, encode_fixed64) T(float, float, flt2uint32, encode_fixed32) T(int64, int64_t, uint64_t, encode_varint) -T(int32, int32_t, uint32_t, encode_varint) +T(int32, int32_t, int64_t, encode_varint) T(fixed64, uint64_t, uint64_t, encode_fixed64) T(fixed32, uint32_t, uint32_t, encode_fixed32) T(bool, bool, bool, encode_varint) |