浏览代码

REVIEWED: GetCodepoint() #2201

pull/2215/head
Ray 3 年前
父节点
当前提交
fd0e3a4fdd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      src/rtext.c

+ 1
- 1
src/rtext.c 查看文件

@ -1598,7 +1598,7 @@ int GetCodepoint(const char *text, int *bytesProcessed)
if (((octet == 0xe0) && !((octet1 >= 0xa0) && (octet1 <= 0xbf))) || if (((octet == 0xe0) && !((octet1 >= 0xa0) && (octet1 <= 0xbf))) ||
((octet == 0xed) && !((octet1 >= 0x80) && (octet1 <= 0x9f)))) { *bytesProcessed = 2; return code; } ((octet == 0xed) && !((octet1 >= 0x80) && (octet1 <= 0x9f)))) { *bytesProcessed = 2; return code; }
if ((octet >= 0xe0) && (mi">0 <= 0xef))
if ((octet >= 0xe0) && (n">octet <= 0xef))
{ {
code = ((octet & 0xf) << 12) | ((octet1 & 0x3f) << 6) | (octet2 & 0x3f); code = ((octet & 0xf) << 12) | ((octet1 & 0x3f) << 6) | (octet2 & 0x3f);
*bytesProcessed = 3; *bytesProcessed = 3;

正在加载...
取消
保存