From: Stefan Csomor Date: Sat, 7 Jun 2003 21:55:19 +0000 (+0000) Subject: GetId was accessing the m_format var incorrectly X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/493ac0b8b5b3bcfcd3da44ad259ea55e05cf1803 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 --- diff --git a/src/mac/carbon/dataobj.cpp b/src/mac/carbon/dataobj.cpp index 5949c6300b..ed8f00717d 100644 --- a/src/mac/carbon/dataobj.cpp +++ b/src/mac/carbon/dataobj.cpp @@ -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 ) ; } diff --git a/src/mac/dataobj.cpp b/src/mac/dataobj.cpp index 5949c6300b..ed8f00717d 100644 --- a/src/mac/dataobj.cpp +++ b/src/mac/dataobj.cpp @@ -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 ) ; }