2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

mii/manager: Resolve sign mismatch warnings

Previously the loop termination condition was testing variables of
different signedness.
This commit is contained in:
Lioncash 2020-07-16 21:04:05 -04:00
parent 3bbf4462db
commit e54c940abf

View file

@ -104,9 +104,9 @@ MiiInfo ConvertStoreDataToInfo(const MiiStoreData& data) {
u16 GenerateCrc16(const void* data, std::size_t size) {
s32 crc{};
for (int i = 0; i < size; i++) {
crc ^= reinterpret_cast<const u8*>(data)[i] << 8;
for (int j = 0; j < 8; j++) {
for (std::size_t i = 0; i < size; i++) {
crc ^= static_cast<const u8*>(data)[i] << 8;
for (std::size_t j = 0; j < 8; j++) {
crc <<= 1;
if ((crc & 0x10000) != 0) {
crc = (crc ^ 0x1021) & 0xFFFF;