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

1bffffffffffffffff does not round-trip #3

Open
hildjj opened this issue Jun 5, 2018 · 1 comment
Open

1bffffffffffffffff does not round-trip #3

hildjj opened this issue Jun 5, 2018 · 1 comment

Comments

@hildjj
Copy link

hildjj commented Jun 5, 2018

1bffffffffffffffff has to turn into a BigInteger in JavaScript when decoded. When re-encoded, that turns into c248ffffffffffffffff:

  c2                -- Tag #2
    48              -- Bytes, length: 8
      ffffffffffffffff -- ffffffffffffffff

If I special-case the encoding for BigIntegers that fit into 8 byte normal integers, then c248ffffffffffffffff won't round-trip. My suggestion is to just set roundtrip to false for this case.

@hildjj
Copy link
Author

hildjj commented Jun 5, 2018

Other similar problems:

3bffffffffffffffff
f90000
f93c00
f97bff
fa47c35000
f9c400

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