fixed wxEncodingConverter-base wxCSConv to report failures as expected

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-11-16 11:58:56 +00:00
parent 02c92ad972
commit c643a97740

View File

@@ -2216,7 +2216,10 @@ public:
{
size_t inbuf = strlen(psz);
if (buf)
m2w.Convert(psz,buf);
{
if (!m2w.Convert(psz,buf))
return (size_t)-1;
}
return inbuf;
}
@@ -2224,7 +2227,10 @@ public:
{
const size_t inbuf = wxWcslen(psz);
if (buf)
w2m.Convert(psz,buf);
{
if (!w2m.Convert(psz,buf))
return (size_t)-1;
}
return inbuf;
}