X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04a378342d96b048e2cf28befa301dad2ae9603d..bfab25d4c41327d6db170be1f832821f36cd425f:/src/common/strconv.cpp diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index e1fed4d99e..778d8dbb05 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -862,20 +862,22 @@ size_t wxMBConvUTF16straight::WC2MB(char *buf, const wchar_t *psz, size_t n) con // swap 16bit MB to 16bit String size_t wxMBConvUTF16swap::MB2WC(wchar_t *buf, const char *psz, size_t n) const { - size_t len=0; + size_t len = 0; - while (*(wxUint16*)psz && (!buf || len < n)) + while ( *psz && (!buf || len < n) ) { - if (buf) + if ( buf ) { ((char *)buf)[0] = psz[1]; ((char *)buf)[1] = psz[0]; buf++; } len++; - psz += sizeof(wxUint16); + psz += 2; } - if (buf && len