sd-boot: fix warning about comparison is always true

This commit is contained in:
Yu Watanabe 2020-01-31 19:20:34 +09:00
parent 80d48995f3
commit a614aa1985

View file

@ -189,7 +189,7 @@ static INTN utf8_to_16(CHAR8 *stra, CHAR16 *c) {
UINTN len;
UINTN i;
if (stra[0] < 0x80)
if (!(stra[0] & 0x80))
len = 1;
else if ((stra[0] & 0xe0) == 0xc0)
len = 2;