From: Vadim Zeitlin Date: Sat, 31 May 2008 01:23:36 +0000 (+0000) Subject: swap all characters instead of just the last one in a loop in wxMBConv_iconv::ToWChar() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/467a2982d277060eced5160b4dc88daff442eb87 swap all characters instead of just the last one in a loop in wxMBConv_iconv::ToWChar() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 9815e5b190..ba9af8782c 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -2115,7 +2115,7 @@ wxMBConv_iconv::ToWChar(wchar_t *dst, size_t dstLen, { // convert to native endianness for ( unsigned i = 0; i < res; i++ ) - dst[dstLen] = WC_BSWAP(dst[i]); + dst[i] = WC_BSWAP(dst[i]); } // NUL-terminate the string if there is any space left