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

ansicolor_sink stores color string view instead of a copy of the color string #1540

Closed
caizongchao opened this issue May 4, 2020 · 3 comments
Labels

Comments

@caizongchao
Copy link

This will cause problem if a stack allocated color string passed to sink->set_color(level, color).

@gabime
Copy link
Owner

gabime commented May 4, 2020

Right. This is very problematic.
Thanks for pointing this.

@gabime gabime added the bug label May 4, 2020
@gabime gabime closed this as completed in 0b36d4e May 4, 2020
@gabime
Copy link
Owner

gabime commented May 4, 2020

Fixed.

@caizongchao
Copy link
Author

caizongchao commented May 5, 2020

Great, thanks!

bachittle pushed a commit to bachittle/spdlog that referenced this issue Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants