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 ) ; }