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