Commit 779ea4da authored by Timothy B. Terriberry's avatar Timothy B. Terriberry

Fix a parentheses error in op_utf8_to_utf16().

For many Latin1 characters this still worked correctly by pure luck.
Unfortunately, that included my test case.
parent d6697905
......@@ -162,7 +162,7 @@ static wchar_t *op_utf8_to_utf16(const char *_src){
if((c0&0xE0)==0xC0){
wchar_t w;
/*Start byte says this is a 2-byte sequence.*/
w=c0&0x1F<<6|c1&0x3F;
w=(c0&0x1F)<<6|c1&0x3F;
if(w>=0x80U){
/*This is a 2-byte sequence that is not overlong.*/
dst[di++]=w;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment