X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd94e8aa4563b22e7c66c379625a8373d20720aa..4175794e0361c78ad63984cd01e4378677803dbc:/src/common/imagbmp.cpp diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index 3dcd8b1254..f8552ff5a5 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -1255,7 +1255,7 @@ bool wxANIHandler::LoadFile(wxImage *image, wxInputStream& stream, { // we always have a data size stream.Read(&datalen, 4); - + datalen = wxINT32_SWAP_ON_BE(datalen) ; //now either data or a FCC if ( (FCC1 == *riff32) || (FCC1 == *list32) ) { @@ -1301,11 +1301,11 @@ bool wxANIHandler::DoCanRead(wxInputStream& stream) // we have a riff file: while ( stream.IsOk() ) { - if ( FCC1 != *anih32 ) + if ( FCC1 == *anih32 ) return TRUE; // we always have a data size: stream.Read(&datalen, 4); - + datalen = wxINT32_SWAP_ON_BE(datalen) ; // now either data or a FCC: if ( (FCC1 == *riff32) || (FCC1 == *list32) ) { @@ -1345,7 +1345,7 @@ int wxANIHandler::GetImageCount(wxInputStream& stream) { // we always have a data size: stream.Read(&datalen, 4); - + datalen = wxINT32_SWAP_ON_BE(datalen) ; // now either data or a FCC: if ( (FCC1 == *riff32) || (FCC1 == *list32) ) { @@ -1357,7 +1357,7 @@ int wxANIHandler::GetImageCount(wxInputStream& stream) { wxUint32 *pData = new wxUint32[datalen/4]; stream.Read(pData, datalen); - int nIcons = *(pData + 1); + int nIcons = wxINT32_SWAP_ON_BE(*(pData + 1)); delete[] pData; return nIcons; }