Skip to content

Store envelope channel_name as std::string#2670

Merged
johnnovak merged 1 commit intomainfrom
wd/envelope_bug
Jul 9, 2023
Merged

Store envelope channel_name as std::string#2670
johnnovak merged 1 commit intomainfrom
wd/envelope_bug

Conversation

@weirddan455
Copy link
Copy Markdown
Collaborator

Found a bug in this envelope class while working on cdrom stuff (almost done btw). It doesn't do a deep copy of its name string so if it gets created with anything besides a string literal, you get random garbage printed out to the debug log.

Pretty simple change to just std::string. It's only used for printing debug text.

@FeralChild64 FeralChild64 added the bug Something isn't working label Jul 9, 2023
Comment thread src/hardware/envelope.cpp Outdated
Copy link
Copy Markdown
Member

@johnnovak johnnovak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch @weirddan455, thanks for fixing!

@johnnovak johnnovak merged commit ca16356 into main Jul 9, 2023
@weirddan455 weirddan455 deleted the wd/envelope_bug branch July 9, 2023 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants