X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4cb7c58da30c8dde304bb7c3b83af3ddba6c9c2..e1db4c1290af151b0d85c4dcad7cbb2414e0d474:/src/common/strconv.cpp diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 9c6299a5d3..f6dbc341f5 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -1145,6 +1145,8 @@ wxMBConvStrictUTF8::FromWChar(char *dst, size_t dstLen, { // skip the next char too as we decoded a surrogate wp++; + if ( srcLen != wxNO_LEN ) + srcLen--; } #else // wchar_t is UTF-32 code = *wp & 0x7fffffff;