]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/stringops.cpp
stricter reply code checking: verify that we get the expected reply, not just that...
[wxWidgets.git] / src / common / stringops.cpp
index b4959f846cd7f35315d955b706b384641f7c1bc8..9ccd34d95cba6554e405d8e9094be392bf6c1bf1 100644 (file)
@@ -131,7 +131,16 @@ bool wxStringOperationsUtf8::IsValidUtf8String(const char *str, size_t len)
             if ( !(b >= 0x80 && b <= 0xBF ) )
                 return false;
         }
-        else if ( b <= 0xEF ) // E1..EF
+        else if ( b == 0xED )
+        {
+            b = *(++c);
+            if ( !(b >= 0x80 && b <= 0x9F ) )
+                return false;
+            b = *(++c);
+            if ( !(b >= 0x80 && b <= 0xBF ) )
+                return false;
+        }
+        else if ( b <= 0xEF ) // E1..EC EE..EF
         {
             for ( int i = 0; i < 2; ++i )
             {