Fix LGTM warning in UTF8 handling (#16507)

This commit is contained in:
Liumeo 2020-04-10 00:02:08 -04:00 committed by GitHub
parent af51074455
commit fbd2e4469e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -490,7 +490,7 @@ R_API int r_utf8_decode(const ut8 *ptr, int ptrlen, RRune *ch) {
if (ptrlen < 1) {
return 0;
}
if (ptrlen > 0 && ptr[0] < 0x80) {
if (ptr[0] < 0x80) {
if (ch) {
*ch = (ut32)ptr[0];
}