mirror of git://gcc.gnu.org/git/gcc.git
libstdc++: Fix check for 7-bit ASCII characters
This should check for c <= 0x7f not x < 0x7f, because 0x7f is an ASCII character (DEL). libstdc++-v3/ChangeLog: * include/bits/unicode.h (__is_single_code_unit): Fix check for 7-bit ASCII characters. Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
This commit is contained in:
parent
85ab3a22ed
commit
fc74f4f0a2
|
@ -61,7 +61,7 @@ namespace __unicode
|
|||
__is_single_code_unit(char32_t __c)
|
||||
{
|
||||
if constexpr (__gnu_cxx::__int_traits<_CharT>::__max <= 0xFF)
|
||||
return __c < 0x7F; // ASCII character
|
||||
return __c <= 0x7F; // ASCII character
|
||||
else
|
||||
return __c < __gnu_cxx::__int_traits<_CharT>::__max
|
||||
&& __is_scalar_value(__c);
|
||||
|
|
Loading…
Reference in New Issue