mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 22:15:46 +00:00
yuzu/main: Resolve precedence bug within CalculateRomFSEntrySize()
Ternary operators have a lower precedence than arithmetic operators, so what was actually occurring here is "return (out + full) ? x : y" which most definitely isn't intended, given we calculate out recursively above. We were essentially doing a lot of work for nothing.
This commit is contained in:
parent
0f25865a14
commit
3a8a7d6f05
1 changed files with 1 additions and 1 deletions
|
@ -763,7 +763,7 @@ static std::size_t CalculateRomFSEntrySize(const FileSys::VirtualDir& dir, bool
|
|||
out += 1 + CalculateRomFSEntrySize(subdir, full);
|
||||
}
|
||||
|
||||
return out + full ? dir->GetFiles().size() : 0;
|
||||
return out + (full ? dir->GetFiles().size() : 0);
|
||||
}
|
||||
|
||||
static bool RomFSRawCopy(QProgressDialog& dialog, const FileSys::VirtualDir& src,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue