msgpack-c icon indicating copy to clipboard operation
msgpack-c copied to clipboard

Pack an int64 but packer is output a uint64 tag

Open swxlion opened this issue 7 years ago • 1 comments

I have a int64_t value, in hex big-endian is 0 0 1 65 89 fc b6 df I used following codes to pack the int64_t value (with C++11 and hpp files of msgpack-c): int64_t value; msgpack::packer<msgpack::sbuffer> _pack; _pck.pack(value); But in the packed binary, we found it is packed as uint64. In hex are: cf 0 0 1 65 89 fc b6 df

In other language, we will detect the type of this value. Uint64 type is processed by another logic beyond int64 type. So, I used int64_t type as the packed parameter, why I got a uint64_t type in packed binary?

swxlion avatar Aug 30 '18 09:08 swxlion

See https://github.com/msgpack/msgpack/issues/164#issuecomment-86368081

redboltz avatar Aug 31 '18 02:08 redboltz