Make sure that the charcode is signless
1. The data with type of char is signed by default. 2. The byte value of UTF-8 is signless by default. 3. So, if a UTF-8 charcode is stored in a char array, we should cast the type of its value from char to unsigned char.
This commit is contained in:
@ -373,7 +373,7 @@ _gtk_css_parser_read_char (GtkCssParser *parser,
|
||||
parser->data++;
|
||||
return TRUE;
|
||||
}
|
||||
if (*parser->data >= 127)
|
||||
if ((*(guchar *) parser->data) >= 127)
|
||||
{
|
||||
gsize len = g_utf8_skip[(guint) *(guchar *) parser->data];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user