Skip to content

Honor explicit BitVector length independently of reserved capacity - #262

Closed
Aschenbath wants to merge 1 commit into
Yomguithereal:masterfrom
Aschenbath:fix/mnemonist-83-20261122-7c2d-30
Closed

Aschenbath wants to merge 1 commit into
Yomguithereal:masterfrom
Aschenbath:fix/mnemonist-83-20261122-7c2d-30

Conversation

@Aschenbath

Copy link
Copy Markdown

An explicit initialLength: 0 was ignored when initialCapacity was nonzero, creating populated logical slots in an intended empty BitVector. Keep length and capacity separate, reserve enough space for both, and retain the existing capacity-only constructor behavior.

Closes #83.

Validation: Full Mocha suite: 566 passing, 1 pending. Both new regression tests fail on original source. ESLint passes for changed JavaScript.

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.

Impossible to create (bit)vector with capacity and length = 0 with actual no length

2 participants