Fixed bug with signed/unsigned char.
This commit is contained in:
parent
e05e546d5f
commit
fb8f12c6cf
@ -63,7 +63,8 @@ inline const char_t tolower(const char_t c)
|
|||||||
|
|
||||||
inline const bool isascii(const char_t c)
|
inline const bool isascii(const char_t c)
|
||||||
{
|
{
|
||||||
return (c <= 127);
|
const unsigned int x = static_cast <unsigned int>(c);
|
||||||
|
return (x <= 127);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -71,7 +72,8 @@ inline const bool isascii(const char_t c)
|
|||||||
|
|
||||||
inline const bool isprint(const char_t c)
|
inline const bool isprint(const char_t c)
|
||||||
{
|
{
|
||||||
return (c >= 0x20 && c <= 0x7E);
|
const unsigned int x = static_cast <unsigned int>(c);
|
||||||
|
return (x >= 0x20 && x <= 0x7E);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user