X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4be927a2d0af07be3554e18726681289c192f4c9..698b34facdbae62cce6b2c9837e698ef9c3fbe8c:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 4b164126f3..11c6340293 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -1119,20 +1119,20 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0, if ( !fileMsg.IsOpened() ) return false; - // get the file size - wxFileOffset nSize = fileMsg.Length(); + // get the file size (assume it is less than 4Gb...) + size_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, 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 ) {