]> git.saurik.com Git - wxWidgets.git/commitdiff
don't write extraneous NUL bytes in wxMBConv_iconv::FromWChar()
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 May 2008 01:55:45 +0000 (01:55 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 May 2008 01:55:45 +0000 (01:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/strconv.cpp

index ded5f2b6a5ef5e454cb70992ccbaaf958b96359e..f1883c6b0efcf5958854deee17b850e25040f55a 100644 (file)
@@ -2194,12 +2194,6 @@ size_t wxMBConv_iconv::FromWChar(char *dst, size_t dstLen,
         cres = iconv(w2m, ICONV_CHAR_CAST(&inbuf), &inbuflen, &dst, &outbuflen);
 
         res = dstLen - outbuflen;
-
-        // NB: iconv was given only wcslen(src) characters on input, and so
-        //     it couldn't convert the trailing zero. Let's do it ourselves
-        //     if there's some room left for it in the output buffer.
-        if (res < dstLen)
-            dst[0] = 0;
     }
     else // no destination buffer
     {