Skip to content

Fix byteOffset typo in BitArray DataView construction#5465

Open
jtdowney wants to merge 1 commit intogleam-lang:mainfrom
jtdowney:js-ffi-typo
Open

Fix byteOffset typo in BitArray DataView construction#5465
jtdowney wants to merge 1 commit intogleam-lang:mainfrom
jtdowney:js-ffi-typo

Conversation

@jtdowney
Copy link
Contributor

I went to try out the new BitArray$BitArray$data JS FFI function and ran into an issue. There's a typo that results in undefined, which is then treated as a zero offset. So if you're using a bit array with an offset, the offset will be ignored, and the read will start at the beginning of the array.

BitArray$BitArray$data used `array.byteOffest` (swpped 'e'),
which evaluated to undefined and caused DataView to always
read from offset 0 instead of the slice's actual start.
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

Successfully merging this pull request may close these issues.

1 participant