Skip to content

Fix uncaught exception on machines with no locales set#191

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

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

Conversation

@mincequi
Copy link

Please share your thoughts. :-)

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
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?

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