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 (potentially) undefined behaviour with std::transform and tolower/toupper #2795

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

Chaosvex
Copy link
Contributor

@Chaosvex Chaosvex commented Oct 9, 2024

🍰 Pull request

Fixes two potential problems with using tolower/toupper with std::transform. The first being that the argument should be converted explicitly to an unsigned char when used with iterators of type char (std::string) and second being non-addressable functions shouldn't be passed to the standard algorithms (applies to std::*).

Proof

Issues

  • None

How2Test

  • None

Todo / Checklist

  • None

@Chaosvex Chaosvex changed the title Fix undefined behaviour with std::transform and tolower/toupper Fix (potentially) undefined behaviour with std::transform and tolower/toupper Oct 9, 2024
@ratkosrb ratkosrb merged commit 061b1ef into vmangos:development Oct 10, 2024
3 checks passed
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.

2 participants