mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-25 16:19:02 +01:00
In four byte UTF-8 sequences, only three bits of the first byte should be
used. Fix from Koga Osamu.
This commit is contained in:
parent
78e783e786
commit
7019f77c05
2
utf8.c
2
utf8.c
@ -313,7 +313,7 @@ utf8_combine(const struct utf8_data *utf8data)
|
||||
value = utf8data->data[3] & 0x3f;
|
||||
value |= (utf8data->data[2] & 0x3f) << 6;
|
||||
value |= (utf8data->data[1] & 0x3f) << 12;
|
||||
value |= (utf8data->data[0] & 0x3f) << 18;
|
||||
value |= (utf8data->data[0] & 0x07) << 18;
|
||||
break;
|
||||
}
|
||||
return (value);
|
||||
|
Loading…
Reference in New Issue
Block a user