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

Fix encoding/decoding of base-256 numbers #215

Merged
merged 2 commits into from Jun 1, 2019

Commits on May 30, 2019

  1. Fix encoding/decoding of base-256 numbers

    - Encoding/decoding of base-256 numbers failed to failed to handle last
    byte in buffer. Handling was previously broken.
    - Take javascript's MAX_SAFE_INTEGER / MIN_SAFE_INTEGER into account
    when encoding/decoding. Namely, if the numbers cannot accurately be
    represented in javascript with integer-precision, a TypeError will be
    thrown.
    - Throw a TypeError if the parser is passed an buffer that does not
    appear to be base-256 encoded. (must start with 0x80 or 0xff)
    justfalter committed May 30, 2019
    Copy the full SHA
    c80341a View commit details
    Browse the repository at this point in the history
  2. Remove duplicate word.

    justfalter committed May 30, 2019
    Copy the full SHA
    9a44de7 View commit details
    Browse the repository at this point in the history