X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=programs%2Fimagex.c;h=772b86ef75463092cd8aa67eeac55c337bb019ef;hp=4efb7a22d525efb78e28f6a08a1b185d72222692;hb=c5ca51d282da984a92074acdc8977ed580e8cdd5;hpb=5433aef3bf3efc14dd158129e392d5c298f8704a diff --git a/programs/imagex.c b/programs/imagex.c index 4efb7a22..772b86ef 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -937,8 +937,8 @@ translate_text_to_tstr(char *text, size_t num_bytes, size_t *num_tchars_ret) size_t num_wchars; if (num_bytes >= 2 && - ((text[0] == 0xff && text[1] == 0xfe) || - (text[0] <= 0x7f && text[1] == 0x00))) + (((unsigned char)text[0] == 0xff && (unsigned char)text[1] == 0xfe) || + ((unsigned char)text[0] <= 0x7f && (unsigned char)text[1] == 0x00))) { /* File begins with 0xfeff, the BOM for UTF-16LE, or it begins * with something that looks like an ASCII character encoded as