Skip to content

Fix uncaught exception on machines with no locales set#191

Closed
mincequi wants to merge 1 commit intoemilk:masterfrom
mincequi:master
Closed

Fix uncaught exception on machines with no locales set#191
mincequi wants to merge 1 commit intoemilk:masterfrom
mincequi:master

Conversation

@mincequi
Copy link
Copy Markdown

Please share your thoughts. :-)

Comment thread loguru.cpp
if (strncmp(cmd, verbosity_flag, arg_len) == 0 && !std::isalpha(cmd[arg_len], std::locale(""))) {
bool is_alpha;
try {
is_alpha = std::isalpha(cmd[arg_len], std::locale(""));
Copy link
Copy Markdown
Collaborator

@bylowerik bylowerik Feb 14, 2022

Choose a reason for hiding this comment

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

Why are we calling locale with ""? Would it make sense to just call std::isalpha?

@mincequi mincequi closed this by deleting the head repository Apr 21, 2026
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