Skip to content

Length is set to 1 but size is three #13

Description

@ztamizzen

I create a ArrayType('float') then instantiate it with size of 1, when I debug it it has three positions but the length is set to 1.
This results in when I run .toArray on it I only get one back. This might sound correct but for some reason the value I wan't is at idx three and does not get returned.

let testArrayType = ArrayType('int'),
    testArray = new testArrayType(1);
 console.log(testArray);

the above results in:

ArrayType {buffer: Buffer[4], __length: 1}
0: 0
1: 0
2: 0
__length: 1

Which does not make sense.
I am using electron, if that matters.

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