]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strconv.cpp
Fix reentrancy in wxDataViewRendererBase::FinishEditing().
[wxWidgets.git] / src / common / strconv.cpp
index 9c6299a5d3f4e7762b8536c3d6ad56ca0def812e..f6dbc341f5b31daff71766543cfaf4a6054a9c5e 100644 (file)
@@ -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;