cppack
cppack copied to clipboard
32-bit MsgPack integers are not correctly unpacked into 64-bit values
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);