fix left/bs for release build

This commit is contained in:
Amos Bird 2019-07-15 11:17:33 +08:00
parent 6d12c685f7
commit 0084b15959
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@ void getPrevCharSize(const char *str, int pos, int *size, int *width) {
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);
}