From e5c28d87105404f6742f5932f59f815afc1864de Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 31 May 2008 01:55:45 +0000 Subject: [PATCH] don't write extraneous NUL bytes in wxMBConv_iconv::FromWChar() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/strconv.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index ded5f2b6a5..f1883c6b0e 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -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 { -- 2.45.2