From 72606b430ede395f43eb957c3826b7bee6583cc6 Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Thu, 28 Oct 2004 23:05:47 +0000 Subject: [PATCH] increase worst case for UTF8 to *4 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/strconv.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 011d3280b8..1450d79def 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -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 ) ; }