Remove unneccessary >= 0 check in a UTF32 comparison

Resolves Coverity CID 1461523.
This commit is contained in:
Christian Kreibich 2021-08-25 14:13:17 -07:00
parent ddbba17e57
commit 66e71c7fd2

View file

@ -2425,8 +2425,7 @@ static bool check_ok_utf8(const unsigned char* start, const unsigned char* end)
if ( result != conversionOK )
return false;
if ( ( output[0] >= 0x0000 && output[0] <= 0x001F ) ||
( output[0] == 0x007F ) ||
if ( ( output[0] <= 0x001F ) || ( output[0] == 0x007F ) ||
( output[0] >= 0x0080 && output[0] <= 0x009F ) )
// Control characters
return false;