mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
fs.mitm: Simplify source merging condition thanks to padding guarantees
This commit is contained in:
parent
a95836552e
commit
caac5f9078
1 changed files with 1 additions and 1 deletions
|
@ -378,7 +378,7 @@ void RomFSBuildContext::Build(std::vector<RomFSSourceInfo> *out_infos) {
|
||||||
case RomFSDataSource::BaseRomFS:
|
case RomFSDataSource::BaseRomFS:
|
||||||
case RomFSDataSource::FileRomFS:
|
case RomFSDataSource::FileRomFS:
|
||||||
/* Try to compact, if possible. */
|
/* Try to compact, if possible. */
|
||||||
if (out_infos->back().type == cur_file->source && ((out_infos->back().virtual_offset + out_infos->back().size + 0xFULL) & ~0xFULL) == cur_file->offset + ROMFS_FILEPARTITION_OFS) {
|
if (out_infos->back().type == cur_file->source) {
|
||||||
out_infos->back().size = cur_file->offset + ROMFS_FILEPARTITION_OFS + cur_file->size - out_infos->back().virtual_offset;
|
out_infos->back().size = cur_file->offset + ROMFS_FILEPARTITION_OFS + cur_file->size - out_infos->back().virtual_offset;
|
||||||
} else {
|
} else {
|
||||||
out_infos->emplace_back(cur_file->offset + ROMFS_FILEPARTITION_OFS, cur_file->size, cur_file->orig_offset + ROMFS_FILEPARTITION_OFS, cur_file->source);
|
out_infos->emplace_back(cur_file->offset + ROMFS_FILEPARTITION_OFS, cur_file->size, cur_file->orig_offset + ROMFS_FILEPARTITION_OFS, cur_file->source);
|
||||||
|
|
Loading…
Reference in a new issue