]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strconv.cpp
stop processing pending events after processing all of them which had been in the...
[wxWidgets.git] / src / common / strconv.cpp
index 70493dbc12904a81d89c459dfe77136a175e8b75..ca7031528b076ec5d5a777a97aa661933a07f866 100644 (file)
@@ -2216,7 +2216,10 @@ public:
     {
         size_t inbuf = strlen(psz);
         if (buf)
-            m2w.Convert(psz,buf);
+        {
+            if (!m2w.Convert(psz,buf))
+                return (size_t)-1;
+        }
         return inbuf;
     }
 
@@ -2224,7 +2227,10 @@ public:
     {
         const size_t inbuf = wxWcslen(psz);
         if (buf)
-            w2m.Convert(psz,buf);
+        {
+            if (!w2m.Convert(psz,buf))
+                return (size_t)-1;
+        }
 
         return inbuf;
     }