CDImage: Fix incorrect CRC-16 computation

This commit is contained in:
Stenzek 2023-11-05 20:58:37 +10:00
parent 82b3907804
commit ee3c770082
No known key found for this signature in database

View file

@ -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