Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix .extend() for arrays of zero-sized type elements #130

Merged
merged 2 commits into from
Sep 1, 2019
Merged

Conversation

bluss
Copy link
Owner

@bluss bluss commented Sep 1, 2019

The raw pointer walk did not do the right thing for ZST, because when
offsets are zero, the start and end pointer would be the same and the
loop ends before incrementing the length correctly.

This bug was on the master/"0.5" branch and has not been in any
released version of arrayvec.

Fixes a bug introduced in #112

This demonstrates a bug in current extend.
The raw pointer walk did not do the right thing for ZST, because when
offsets are zero, the start and end pointer would be the same and the
loop ends before incrementing the length correctly.
@bluss bluss merged commit 6ed5b7b into master Sep 1, 2019
@bluss bluss deleted the fix-extend-zst branch September 1, 2019 14:10
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