]> git.saurik.com Git - wxWidgets.git/commitdiff
increase worst case for UTF8 to *4
authorRyan Norton <wxprojects@comcast.net>
Thu, 28 Oct 2004 23:05:47 +0000 (23:05 +0000)
committerRyan Norton <wxprojects@comcast.net>
Thu, 28 Oct 2004 23:05:47 +0000 (23:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/strconv.cpp

index 011d3280b81992aa177a6e6af4c72b567ce9a98e..1450d79defab4fe8508782f93b0e1838e72b7229 100644 (file)
@@ -1902,7 +1902,7 @@ public:
         if (szOut == NULL)
         {
             // worst case
-            nRealOutSize = ((nBufSize - 1) << 1)+1 ;
+            nRealOutSize = ((nBufSize - 1) << 2)+1 ;
             szBuffer = new char[ nRealOutSize ] ;
         }
         else
@@ -2079,7 +2079,7 @@ public:
         if (buf == NULL)
         {
             // worst case
-            n = byteInLen * 2 ;
+            n = byteInLen << 1 ;
             tbuf = (char*) malloc( n ) ;
         }