Skip to content

fixing issue 2120#2121

Merged
lemire merged 1 commit intomasterfrom
issue2120
Feb 8, 2024
Merged

fixing issue 2120#2121
lemire merged 1 commit intomasterfrom
issue2120

Conversation

@lemire
Copy link
Copy Markdown
Member

@lemire lemire commented Feb 8, 2024

Currently, we trust the user to provide us with a correct value of capacity. In particular, capacity must be larger or equal to the length.

In this PR, we check the value of capacity and if it is smaller than the length, we set it to the length.

Fixes #2120

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.

When capacity of padded_string_view is given a size smaller than length, padding() is wrapping

1 participant