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: custom: do not crash if input text is not valid utf-8 #2624

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

sahib
Copy link
Contributor

@sahib sahib commented Oct 31, 2023

This is the fix for the issue described in #2621: We should not crash if the input to a custom widget is invalid utf-8.
Instead, invalid characters are now shown as appropriate characters in your font:

image

I did not touch the JSON input code, since it should be fine as JSON should be valid UTF-8. I suspect there are other places in Waybar that needs similar treatment. This is beyond the scope of this PR though.

Please double check for potential memory leaks, as my C++ is rusty (no pun intended).

@Alexays
Copy link
Owner

Alexays commented Oct 31, 2023

Thanks!

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.

None yet

2 participants