mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 15:45:42 +00:00
CDImage: Fix incorrect CRC-16 computation
This commit is contained in:
parent
82b3907804
commit
ee3c770082
|
@ -507,7 +507,8 @@ u16 CDImage::SubChannelQ::ComputeCRC(const Data& data)
|
||||||
for (u32 i = 0; i < 10; i++)
|
for (u32 i = 0; i < 10; i++)
|
||||||
value = crc16_table[(value >> 8) ^ data[i]] ^ (value << 8);
|
value = crc16_table[(value >> 8) ^ data[i]] ^ (value << 8);
|
||||||
|
|
||||||
return ~(value >> 8) | (~(value) << 8);
|
value = ~value;
|
||||||
|
return (value >> 8) | (value << 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CDImage::SubChannelQ::IsCRCValid() const
|
bool CDImage::SubChannelQ::IsCRCValid() const
|
||||||
|
|
Loading…
Reference in a new issue