Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There seems to be a problem with the handling of signed numbers #20

Open
Lo-Dyih-Yuaan opened this issue Sep 12, 2022 · 1 comment
Open

Comments

@Lo-Dyih-Yuaan
Copy link

As far as I understand, in RFC 8949, only NEGATIVE numbers are serialized as Type1, but in this implementation, all signed numbers are serialized as type1.
I found this problem when I tried to convertb to Python by cbor2.

Lo-Dyih-Yuaan added a commit to Lo-Dyih-Yuaan/CBOR.jl that referenced this issue Sep 12, 2022
@Lo-Dyih-Yuaan
Copy link
Author

As a example

julia> CBOR.encode(1::Int64)
9-element Vector{UInt8}:
 0x3b
 0xff
 0xff
 0xff
 0xff
 0xff
 0xff
 0xff
 0xfe

attdona pushed a commit to attdona/CBOR.jl that referenced this issue Jun 27, 2023
SimonDanisch added a commit that referenced this issue Oct 23, 2024
Fix encode/decode of unsigned and negative numbers, see also #20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant