mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-23 20:12:39 +03:00
fixed an off-by-one error in UTF8ToText().
This commit is contained in:
parent
4c38178fb9
commit
a150f64e9c
@ -227,7 +227,7 @@ CUnicode::UTF8ToText(const CString& src, bool* errors)
|
||||
// handle nul terminator
|
||||
mblen = wcrtomb(mbc, L'\0', &state);
|
||||
if (mblen != -1) {
|
||||
len += mblen - 1;
|
||||
len += mblen;
|
||||
}
|
||||
assert(mbsinit(&state) != 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user