cppack icon indicating copy to clipboard operation
cppack copied to clipboard

32-bit MsgPack integers are not correctly unpacked into 64-bit values

Open dinhngtu opened this issue 2 years ago • 0 comments

Hello,

cppack does not correctly unpack 32-bit MsgPack integers into 64-bit values.

Please see a minimal reproducer below:

std::array<uint64_t, 2> test_num = {65537, 65537};
packer.clear();
packer.process(test_num);
std::array<uint64_t, 2> x;
unpacker.set_data(packer.vector().data(), packer.vector().size());
unpacker.process(x);
REQUIRE(x[0] == 65537);
REQUIRE(x[1] == 65537);

dinhngtu avatar Jun 13 '22 12:06 dinhngtu