]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-boot: fix warning about comparison is always true
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 31 Jan 2020 10:20:34 +0000 (19:20 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 31 Jan 2020 10:20:34 +0000 (19:20 +0900)
src/boot/efi/util.c

index da743dcb9f2ced5e98d48c43126e12f001c54b07..b44f051d95d0019ad267ca872add8dffb0f01cfc 100644 (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;