Open Archie3d opened 2 years ago
Hi 👋 , There are seem to be some unhandled cases in the MessagePack serializer:
fromData
0xd0
0xd1
0xd2
0xd3
... else if (d == 0xd0) { return int(is.readByte()); } else if (d == 0xd1) { return int(is.readShortBigEndian()); } else if (d == 0xd2) { return is.readIntBigEndian(); } else if (d == 0xd3) { return is.readInt64BigEndian(); } ...
toData
... else if (v >= 32768) { os.writeByte (char (0xd1)); os.writeShortBigEndian (short (v)); } else if (v >= 2147483648) { os.writeByte (char (0xd2)); os.writeIntBigEndian (int (v)); } ...
has to be
... else if (v >= -32768) { os.writeByte (char (0xd1)); os.writeShortBigEndian (short (v)); } else if (v >= -2147483648LL) { os.writeByte (char (0xd2)); os.writeIntBigEndian (int (v)); } ...
else { os.writeByte (char (0xdc)); os.writeIntBigEndian (n); }
must be
else { os.writeByte (char (0xdd)); os.writeIntBigEndian (n); }
Thanks!
Hi 👋 , There are seem to be some unhandled cases in the MessagePack serializer:
fromData
does not handle cases0xd0
,0xd1
,0xd2
, and0xd3
:toData
code readshas to be
must be
Thanks!