Skip to content

Uint8Array.wrap throws "Index out of range" for length 0 #1066

Closed

Description

@webmaster128

When I call Uint8Array.wrap(buffer, 0, 0) on a buffer of length 0, I get an "Index out of range" error. For Other sizes this works as expected.

If I understand correctly, this code is buggy: https://github.com/AssemblyScript/assemblyscript/blob/v0.8.1/std/assembly/typedarray.ts#L1694-L1696.

Activity

  1. webmaster128 commented on Jan 27, 2020

    @webmaster128
    Author

    This was fixed in #1067 (and #1070?) on current master, right? Should it be closed?

  2. MaxGraey commented on Jan 27, 2020

    @MaxGraey
    Member

    Fix should be in 0.9 already. So you could check how this work and close if everything right

  3. webmaster128 commented on Jan 27, 2020

    @webmaster128
    Author

    Fixed in 0.9.0. Thanks!

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions