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