diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2014-03-08 16:27:45 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2014-03-08 16:27:45 +0000 |
commit | 7019f77c05f45ea9267f7e768d0abb0b6a928a25 (patch) | |
tree | e2a01e03658abcca56346f11f349a8560dac31b3 | |
parent | 78e783e7863eb33981da4a5ad48dd9e2aa2b08dd (diff) | |
download | rtmux-7019f77c05f45ea9267f7e768d0abb0b6a928a25.tar.gz rtmux-7019f77c05f45ea9267f7e768d0abb0b6a928a25.tar.bz2 rtmux-7019f77c05f45ea9267f7e768d0abb0b6a928a25.zip |
In four byte UTF-8 sequences, only three bits of the first byte should be
used. Fix from Koga Osamu.
-rw-r--r-- | utf8.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |