]> git.saurik.com Git - wxWidgets.git/commitdiff
don't return success when converting incomplete UTF-7 sequences
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 May 2008 01:22:16 +0000 (01:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 May 2008 01:22:16 +0000 (01:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/strconv.cpp

index 7f2c37a398868787a1db31016cd8578ee5ce2f44..9815e5b19050ca7ef08fb0be26720d4363fe79e0 100644 (file)
@@ -564,14 +564,13 @@ size_t wxMBConvUTF7::MB2WC(wchar_t *buf, const char *psz, size_t n) const
                         if (buf)
                             *buf++ |= c;
                         len ++;
+                        ok = true;
                     }
                     else
                     {
                         if (buf)
                             *buf = (wchar_t)(c << 8);
                     }
-
-                    ok = true;
                 }
             }