]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/core/strconv_cf.cpp
add support for table border width attribute (closes #10610)
[wxWidgets.git] / src / osx / core / strconv_cf.cpp
index b4cde0c351bee28e264797685b30fec92068c043..78f6429c2c7114350114f79d064f5b549b266d79 100644 (file)
@@ -115,8 +115,7 @@ WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_cf(wxFontEncoding encoding)
                     dstSize * sizeof(wchar_t),
                     &usedBufLen);
 
-            // charsConverted is > 0 iff conversion succeeded
-            if(charsConverted <= 0)
+            if(charsConverted < CFStringGetLength(theString))
                 return wxCONV_FAILED;
 
             /* usedBufLen is the number of bytes written, so we divide by
@@ -217,8 +216,7 @@ WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_cf(wxFontEncoding encoding)
                 &usedBufLen
             );
 
-        // charsConverted is > 0 iff conversion succeeded
-        if(charsConverted <= 0)
+        if(charsConverted < CFStringGetLength(theString) )
             return wxCONV_FAILED;
 
         return usedBufLen;