]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed a bug caused by passing a wxChar[] buffer to a function taking a wxString;...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Thu, 9 Oct 2008 17:00:32 +0000 (17:00 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Thu, 9 Oct 2008 17:00:32 +0000 (17:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextbuffer.cpp

index 3b3e0e03865f3fbd809c29a2e14a164ef71a9b31..8c75c513df080610d2092c8579a5c5a0496d946f 100644 (file)
@@ -7588,7 +7588,10 @@ bool wxRichTextImageBlock::ReadHex(wxInputStream& stream, int length, wxBitmapTy
     if (m_data)
         delete[] m_data;
 
-    wxChar str[2];
+    // create a null terminated temporary string:
+    char str[3];
+    str[2] = '\0';
+
     m_data = new unsigned char[dataSize];
     int i;
     for (i = 0; i < dataSize; i ++)