fixed an off-by-one error in UTF8ToText().

This commit is contained in:
crs 2002-07-24 19:23:46 +00:00
parent 4c38178fb9
commit a150f64e9c

View File

@ -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);