]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextbuffer.cpp
Make wxSpinCtrlGeneric usable as wxDVC editor control.
[wxWidgets.git] / src / richtext / richtextbuffer.cpp
index c0c9e9345f607b378954b886257f2d08e3c2f84d..c095af9c78cdd0ec41c3b9569659cf6d5905f37c 100644 (file)
@@ -10421,8 +10421,8 @@ bool wxRichTextImageBlock::WriteHex(wxOutputStream& stream)
         return true;
 
     int bufSize = 100000;
-    if (int(m_dataSize+1) < bufSize)
-        bufSize = m_dataSize;
+    if (int(2*m_dataSize) < bufSize)
+        bufSize = 2*m_dataSize;
     char* buf = new char[bufSize+1];
 
     int left = m_dataSize;