use wxFileSize_t instead of wxFileOffset or off_t
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1120,19 +1120,19 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0,
|
||||
return false;
|
||||
|
||||
// get the file size
|
||||
wxFileOffset nSize = fileMsg.Length();
|
||||
wxFileSize_t nSize = fileMsg.Length();
|
||||
if ( nSize == wxInvalidOffset )
|
||||
return false;
|
||||
|
||||
// read the whole file in memory
|
||||
m_pData = new size_t8[nSize];
|
||||
if ( fileMsg.Read(m_pData, (size_t)nSize) != (size_t)nSize ) {
|
||||
if ( fileMsg.Read(m_pData, nSize) != nSize ) {
|
||||
wxDELETEA(m_pData);
|
||||
return false;
|
||||
}
|
||||
|
||||
// examine header
|
||||
bool bValid = (size_t)nSize > sizeof(wxMsgCatalogHeader);
|
||||
bool bValid = nSize > sizeof(wxMsgCatalogHeader);
|
||||
|
||||
wxMsgCatalogHeader *pHeader = (wxMsgCatalogHeader *)m_pData;
|
||||
if ( bValid ) {
|
||||
@@ -1157,7 +1157,7 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0,
|
||||
Swap(pHeader->ofsOrigTable));
|
||||
m_pTransTable = (wxMsgTableEntry *)(m_pData +
|
||||
Swap(pHeader->ofsTransTable));
|
||||
m_nSize = (size_t)nSize;
|
||||
m_nSize = nSize;
|
||||
|
||||
// now parse catalog's header and try to extract catalog charset and
|
||||
// plural forms formula from it:
|
||||
|
Reference in New Issue
Block a user