]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strconv.cpp
Always invoke default action even if dclick is caught from wxListBox (as per wxMSW...
[wxWidgets.git] / src / common / strconv.cpp
index f4731ceabee2e5203f1c1c7b0f46d2647d63a1fc..eb1cc823b12a70a9c52a59d6d0512bcbceba6af6 100644 (file)
     #define wxHAVE_WIN32_MB2WC
 #endif
 
-#ifdef __SALFORDC__
-    #include <clib.h>
-#endif
-
 #ifdef HAVE_ICONV
     #include <iconv.h>
     #include "wx/thread.h"
@@ -2457,8 +2453,10 @@ public:
                     return wxCONV_FAILED;
             }
 
+            if ( !n )
+                n = wcslen(pwz);
             wxWCharBuffer wcBuf(n);
-            if ( MB2WC(wcBuf.data(), buf, n) == wxCONV_FAILED ||
+            if ( MB2WC(wcBuf.data(), buf, n + 1) == wxCONV_FAILED ||
                     wcscmp(wcBuf, pwz) != 0 )
             {
                 // we didn't obtain the same thing we started from, hence