Fix previous fix
This commit is contained in:
parent
18efb2016d
commit
5203a4fb49
|
|
@ -105,7 +105,7 @@ namespace Nz
|
||||||
|
|
||||||
ByteArray CRC32Hasher::End()
|
ByteArray CRC32Hasher::End()
|
||||||
{
|
{
|
||||||
m_crc = HostToLittleEndian(m_crc ^ 0xFFFFFFFF);
|
m_crc = BigEndianToHost(m_crc ^ 0xFFFFFFFF);
|
||||||
|
|
||||||
return ByteArray(reinterpret_cast<UInt8*>(&m_crc), 4);
|
return ByteArray(reinterpret_cast<UInt8*>(&m_crc), 4);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ namespace Nz
|
||||||
m_sum1 = (m_sum1 & 0xFF) + (m_sum1 >> 8);
|
m_sum1 = (m_sum1 & 0xFF) + (m_sum1 >> 8);
|
||||||
m_sum2 = (m_sum2 & 0xFF) + (m_sum2 >> 8);
|
m_sum2 = (m_sum2 & 0xFF) + (m_sum2 >> 8);
|
||||||
|
|
||||||
UInt16 fletcher = BigEndianToHost((m_sum2 << 8) | m_sum1);
|
UInt16 fletcher = BigEndianToHost(UInt16((m_sum2 << 8) | m_sum1));
|
||||||
return ByteArray(reinterpret_cast<UInt8*>(&fletcher), 2);
|
return ByteArray(reinterpret_cast<UInt8*>(&fletcher), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue