Skip to content

Can't write fields of size>31 #4

Description

@nickboucher

When you call .writebits(n, size) with size > 31, the operation fails silently. This is because JS casts all numbers to Int32's under-the-hood whenever bitwise operations are invoked, such as the following line in writebits:

bits = this._spill << size | n;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions