diff --git a/emummc/.gitrepo b/emummc/.gitrepo index 2dbf99f6b..b0c176ad2 100644 --- a/emummc/.gitrepo +++ b/emummc/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/m4xw/emuMMC branch = develop - commit = b355ee6a8f376faa615785419c7d73a8814d9d65 - parent = b24784f5c13a142bd0cb5d7edb82691c71f4bd00 + commit = c6717b9320247d3ec81b372adae5e5623be7d16b + parent = bf8de39e694dc64431180bc513ce110f07fc3531 method = rebase cmdver = 0.4.1 diff --git a/emummc/source/emuMMC/emummc.c b/emummc/source/emuMMC/emummc.c index 0447471ad..782b4837d 100644 --- a/emummc/source/emuMMC/emummc.c +++ b/emummc/source/emuMMC/emummc.c @@ -300,21 +300,21 @@ static uint64_t emummc_read_write_inner(void *buf, unsigned int sector, unsigned while (remaining > 0) { const unsigned int cur_sectors = MIN(remaining, f_emu.part_size - sector); - if (f_lseek(fp, sector << 9) != FR_OK) + if (f_lseek(fp, (u64)sector << 9) != FR_OK) return 0; // Out of bounds. if (is_write) { - if (f_write_fast(fp, buf, cur_sectors << 9) != FR_OK) + if (f_write_fast(fp, buf, (u64)cur_sectors << 9) != FR_OK) return 0; } else { - if (f_read_fast(fp, buf, cur_sectors << 9) != FR_OK) + if (f_read_fast(fp, buf, (u64)cur_sectors << 9) != FR_OK) return 0; } - buf = (char *)buf + (cur_sectors << 9); + buf = (char *)buf + ((u64)cur_sectors << 9); remaining -= cur_sectors; sector = 0; ++fp; @@ -336,14 +336,14 @@ static uint64_t emummc_read_write_inner(void *buf, unsigned int sector, unsigned break; } - if (f_lseek(fp, sector << 9) != FR_OK) + if (f_lseek(fp, (u64)sector << 9) != FR_OK) return 0; // Out of bounds. uint64_t res = 0; if (!is_write) - res = !f_read_fast(fp, buf, num_sectors << 9); + res = !f_read_fast(fp, buf, (u64)num_sectors << 9); else - res = !f_write_fast(fp, buf, num_sectors << 9); + res = !f_write_fast(fp, buf, (u64)num_sectors << 9); return res; }