]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ole/oleutils.cpp
Dont't finish any editing if there is no control
[wxWidgets.git] / src / msw / ole / oleutils.cpp
index e23617df25e3cbabc0fc69aeb74839e4ef6e2054..59f387426c88a9f981723a2f2d61246220d0b669 100644 (file)
@@ -87,8 +87,8 @@ WXDLLEXPORT wxString wxConvertStringFromOle(BSTR bStr)
 #else
     wxString str;
     if ( !::WideCharToMultiByte(CP_ACP, 0 /* no flags */,
-                                bStr, len + 1 /* include last NUL */,
-                                wxStringBuffer(str, len), len,
+                                bStr, len /* not necessary NUL-terminated */,
+                                wxStringBuffer(str, len + 1), len + 1,
                                 NULL, NULL /* no default char */) )
     {
         str.clear();