未验证 提交 75dabd02 编写于 作者: S slguan 提交者: GitHub

Merge pull request #27 from amosbird/t2

fix left/bs for release build
...@@ -57,7 +57,8 @@ void getPrevCharSize(const char *str, int pos, int *size, int *width) { ...@@ -57,7 +57,8 @@ void getPrevCharSize(const char *str, int pos, int *size, int *width) {
if (str[pos] > 0 || countPrefixOnes(str[pos]) > 1) break; if (str[pos] > 0 || countPrefixOnes(str[pos]) > 1) break;
} }
assert(mbtowc(&wc, str + pos, MB_CUR_MAX) == *size); int rc = mbtowc(&wc, str + pos, MB_CUR_MAX);
assert(rc == *size);
*width = wcwidth(wc); *width = wcwidth(wc);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册