Skip to content

Simplify a copying the fill from basic_specs - #4290

Merged
vitaut merged 1 commit into
fmtlib:masterfrom
phprus:issue-4289
Jan 5, 2025
Merged

Simplify a copying the fill from basic_specs#4290
vitaut merged 1 commit into
fmtlib:masterfrom
phprus:issue-4289

Conversation

@phprus

@phprus phprus commented Jan 4, 2025

Copy link
Copy Markdown
Contributor

Simplify code.

Fix for #4289

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
@phprus

phprus commented Jan 4, 2025

Copy link
Copy Markdown
Contributor Author

@ja11sop , test this PR, please.

@ja11sop

ja11sop commented Jan 5, 2025

Copy link
Copy Markdown

I just ran against this PR and all looks good

@phprus

phprus commented Jan 5, 2025

Copy link
Copy Markdown
Contributor Author

@vitaut please review this PR.

@vitaut

vitaut commented Jan 5, 2025

Copy link
Copy Markdown
Contributor

I wonder why the issue reported in #4289 hasn't been caught by existing tests? It might be worth adding a regression test.

@vitaut
vitaut merged commit 2c3a569 into fmtlib:master Jan 5, 2025
@phprus

phprus commented Jan 5, 2025

Copy link
Copy Markdown
Contributor Author

@vitaut

I'm guessing that a previous version of the code might have corrupted memory somewhere earlier.

I don't see the root of case for this error, but I think move the fill copying into the basic_specs class as a member function is a nice simplification of the logic.

The code from PR is free of any possibility of memory corruption.

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.

3 participants