DrewMcArthur / DrewMcArthur/msgpack-bal
Cannot decode large signed Int64
Open
- Dominant language
- Ballerina
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
from `testCases.bal:67`
```bal
// saving this test case for later: encoding works,
// but currently trying to run decode([0xd3, ...]) will fail,
// because 0xd3 == signed Int64, and our algorithm fails.
// this is because we calculat an int, then subtract (1 << 8*nBytes), and
// if nBytes == 8, we would try to 1 << 64, which doesn't work with 64-bit ints.
TestCase[] SignedInt64TestCase = [
{"input": -11111111111, "output": [0xd3, 0xff, 0xff, 0xff, 0xfd, 0x69, 0xb9, 0xe6, 0x39]}
];
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.