Zaid-Ajaj / Fable.Remoting

Type-safe communication layer (RPC-style) for F# featuring Fable and .NET Apps
https://zaid-ajaj.github.io/Fable.Remoting/
MIT License
272 stars 54 forks source link

fix int64 serialization #255

Closed christoph-feb22 closed 3 years ago

christoph-feb22 commented 3 years ago

Hi Zaid,

I noticed a bug on realy rare cases. On serializing int64 to MsgPack, while there are bytes with value 0 at position 5 or 6 in the byte representation, these positions will be removed. This leads to an invalid case. There is an int64 number with to less byte positions.

The byte representation of the number in the test case is: 8 217 43 82 0 0 153 102. In the old implementation the 0 will be removed.

Zaid-Ajaj commented 3 years ago

Hi @christoph-feb22 thanks a lot for this the fix, to be honest I don't understand the issue (@kerams is the MsgPack expert) but the tests pass with flying green colors, so I am happy to merge and publish as soon as possible

Zaid-Ajaj commented 3 years ago

PR merged and published into Fable.Remoting.MsgPack v1.12 and all downstream packages that depend on it (basically all of them) thanks a lot @christoph-feb22 for the fix 🙏 ❤️