X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5af840f1f10797ff3d4c4e4d8bced10e74be7e76..aacd14428971b5e199f88597f76a895c68dd298f:/src/mac/carbon/mimetmac.cpp diff --git a/src/mac/carbon/mimetmac.cpp b/src/mac/carbon/mimetmac.cpp index 392f866a21..9c0f3be67b 100644 --- a/src/mac/carbon/mimetmac.cpp +++ b/src/mac/carbon/mimetmac.cpp @@ -1670,7 +1670,7 @@ wxFileType* wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo) ICGetMapEntry( (ICInstance) m_hIC, (Handle) m_hDatabase, pFileType->m_impl->m_lIndex, &entry); - entry.creatorAppName = psCreatorName; + memcpy(entry.creatorAppName, psCreatorName, sizeof(Str255)); entry.fileCreator = creator; status = ICSetMapEntry( (ICInstance) m_hIC, (Handle) m_hDatabase, @@ -1722,11 +1722,11 @@ wxFileType* wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo) entry.fileCreator = creator; entry.postCreator = 0; entry.flags = kICMapDataForkBit; //TODO: Maybe resource is valid by default too? - entry.extension = psExtension; - entry.creatorAppName = psCreatorName; - entry.postAppName = psPostCreatorName; - entry.MIMEType = psMimeType; - entry.entryName = psDescription; + PLstrcpy( entry.extension , psExtension ) ; + memcpy(entry.creatorAppName, psCreatorName, sizeof(Str255)); + memcpy(entry.postAppName, psPostCreatorName, sizeof(Str255)); + memcpy(entry.MIMEType, psMimeType, sizeof(Str255)); + memcpy(entry.entryName, psDescription, sizeof(Str255)); status = ICAddMapEntry( (ICInstance) m_hIC, (Handle) m_hDatabase, &entry); @@ -1937,7 +1937,7 @@ wxMimeTypesManagerImpl::Unassociate(wxFileType *pFileType) #if defined(__DARWIN__) if(!bInfoSuccess) - return NULL; + return FALSE; #endif //this should be as easy as removing the entry from the database and then saving