Fixed buffer overrun in call to wxStripMenuCodes()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -73,11 +73,7 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight)
|
|||||||
wxMemoryDC dc;
|
wxMemoryDC dc;
|
||||||
dc.SetFont(GetFont());
|
dc.SetFont(GetFont());
|
||||||
|
|
||||||
// ## ugly...
|
wxString str = wxStripMenuCodes(m_strName);
|
||||||
wxChar *szStripped = new wxChar[m_strName.Len()];
|
|
||||||
wxStripMenuCodes((wxChar *)m_strName.c_str(), szStripped);
|
|
||||||
wxString str = szStripped;
|
|
||||||
delete [] szStripped;
|
|
||||||
|
|
||||||
// # without this menu items look too tightly packed (at least under Windows)
|
// # without this menu items look too tightly packed (at least under Windows)
|
||||||
str += wxT('W'); // 'W' is typically the widest letter
|
str += wxT('W'); // 'W' is typically the widest letter
|
||||||
|
Reference in New Issue
Block a user