]> git.saurik.com Git - wxWidgets.git/commitdiff
swap all characters instead of just the last one in a loop in wxMBConv_iconv::ToWChar()
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 May 2008 01:23:36 +0000 (01:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 May 2008 01:23:36 +0000 (01:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/strconv.cpp

index 9815e5b19050ca7ef08fb0be26720d4363fe79e0..ba9af8782cd6cc8a1a1253badf58a73214290fa8 100644 (file)
@@ -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