1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-18 01:46:47 +00:00

fssystem: fix bug in BufferedStorage

This commit is contained in:
Michael Scire 2021-01-28 14:28:45 -08:00
parent 8d10584a51
commit b5f72b9f20

View file

@ -899,7 +899,7 @@ namespace ams::fssystem::save {
const s64 cur_offset_end = offset + *size;
size_t cur_size = 0;
if (!util::IsAligned(offset, this->block_size)) {
if (!util::IsAligned(cur_offset_end, this->block_size)) {
const s64 aligned_size = cur_offset_end - util::AlignDown(cur_offset_end, this->block_size);
cur_size = std::min(aligned_size, static_cast<s64>(*size));
} else if (*size < this->block_size) {