]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed wxEncodingConverter-base wxCSConv to report failures as expected
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 16 Nov 2004 11:58:56 +0000 (11:58 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 16 Nov 2004 11:58:56 +0000 (11:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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;
     }