libstdc++: Use unsigned char argument to std::isdigit
Passing plain char to isdigit is undefined if the value is negative. libstdc++-v3/ChangeLog: * include/std/charconv (__from_chars_alnum): Pass unsigned char to std::isdigit.
This commit is contained in:
parent
0bd8a9ef70
commit
d0d6ca0197
@ -565,7 +565,7 @@ namespace __detail
|
||||
while (__first != __last)
|
||||
{
|
||||
unsigned char __c = *__first;
|
||||
if (std::isdigit(__c))
|
||||
if (std::isdigit(static_cast<unsigned char>(__c)))
|
||||
__c -= '0';
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user