1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-22 20:06:40 +00:00
subrepo:
  subdir:   "emummc"
  merged:   "c6717b93"
upstream:
  origin:   "https://github.com/m4xw/emummc"
  branch:   "develop"
  commit:   "c6717b93"
git-subrepo:
  version:  "0.4.1"
  origin:   "???"
  commit:   "???"
This commit is contained in:
Michael Scire 2021-05-10 07:50:39 -07:00
parent bf8de39e69
commit 3f3aaa01fa
2 changed files with 9 additions and 9 deletions

View file

@ -6,7 +6,7 @@
[subrepo] [subrepo]
remote = https://github.com/m4xw/emuMMC remote = https://github.com/m4xw/emuMMC
branch = develop branch = develop
commit = b355ee6a8f376faa615785419c7d73a8814d9d65 commit = c6717b9320247d3ec81b372adae5e5623be7d16b
parent = b24784f5c13a142bd0cb5d7edb82691c71f4bd00 parent = bf8de39e694dc64431180bc513ce110f07fc3531
method = rebase method = rebase
cmdver = 0.4.1 cmdver = 0.4.1

View file

@ -300,21 +300,21 @@ static uint64_t emummc_read_write_inner(void *buf, unsigned int sector, unsigned
while (remaining > 0) { while (remaining > 0) {
const unsigned int cur_sectors = MIN(remaining, f_emu.part_size - sector); 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. return 0; // Out of bounds.
if (is_write) 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; return 0;
} }
else 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; return 0;
} }
buf = (char *)buf + (cur_sectors << 9); buf = (char *)buf + ((u64)cur_sectors << 9);
remaining -= cur_sectors; remaining -= cur_sectors;
sector = 0; sector = 0;
++fp; ++fp;
@ -336,14 +336,14 @@ static uint64_t emummc_read_write_inner(void *buf, unsigned int sector, unsigned
break; break;
} }
if (f_lseek(fp, sector << 9) != FR_OK) if (f_lseek(fp, (u64)sector << 9) != FR_OK)
return 0; // Out of bounds. return 0; // Out of bounds.
uint64_t res = 0; uint64_t res = 0;
if (!is_write) if (!is_write)
res = !f_read_fast(fp, buf, num_sectors << 9); res = !f_read_fast(fp, buf, (u64)num_sectors << 9);
else else
res = !f_write_fast(fp, buf, num_sectors << 9); res = !f_write_fast(fp, buf, (u64)num_sectors << 9);
return res; return res;
} }