fix wxMBConv_iconv to respect the base class conventions: when the input is NUL-terminated, the output should be NUL-terminated and the return value should account for the terminating NUL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2082,6 +2082,11 @@ wxMBConv_iconv::ToWChar(wchar_t *dst, size_t dstLen,
|
|||||||
srcLen = p - src;
|
srcLen = p - src;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// when we're determining the length of the string ourselves we count
|
||||||
|
// the terminating NUL(s) as part of it and always NUL-terminate the
|
||||||
|
// output
|
||||||
|
srcLen += nulLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we express length in the number of (wide) characters but iconv always
|
// we express length in the number of (wide) characters but iconv always
|
||||||
|
Reference in New Issue
Block a user