GetId was accessing the m_format var incorrectly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -84,6 +84,7 @@ void wxDataFormat::SetType( wxDataFormatId Type )
|
||||
m_format = kDragFlavorTypeHFS ;
|
||||
else
|
||||
{
|
||||
m_format = '????' ;
|
||||
wxFAIL_MSG( wxT("invalid dataformat") );
|
||||
}
|
||||
}
|
||||
@@ -96,7 +97,7 @@ wxDataFormatId wxDataFormat::GetType() const
|
||||
wxString wxDataFormat::GetId() const
|
||||
{
|
||||
char text[5] ;
|
||||
strncpy( text , (char*) m_format , 4 ) ;
|
||||
strncpy( text , (char*) &m_format , 4 ) ;
|
||||
text[4] = 0 ;
|
||||
return wxString::FromAscii( text ) ;
|
||||
}
|
||||
|
@@ -84,6 +84,7 @@ void wxDataFormat::SetType( wxDataFormatId Type )
|
||||
m_format = kDragFlavorTypeHFS ;
|
||||
else
|
||||
{
|
||||
m_format = '????' ;
|
||||
wxFAIL_MSG( wxT("invalid dataformat") );
|
||||
}
|
||||
}
|
||||
@@ -96,7 +97,7 @@ wxDataFormatId wxDataFormat::GetType() const
|
||||
wxString wxDataFormat::GetId() const
|
||||
{
|
||||
char text[5] ;
|
||||
strncpy( text , (char*) m_format , 4 ) ;
|
||||
strncpy( text , (char*) &m_format , 4 ) ;
|
||||
text[4] = 0 ;
|
||||
return wxString::FromAscii( text ) ;
|
||||
}
|
||||
|
Reference in New Issue
Block a user