Fix more MSVC warnings

This commit is contained in:
Pengfei Zhu
2022-07-01 23:42:09 +08:00
parent a2404bf243
commit 981100611a
6 changed files with 16 additions and 24 deletions
+2 -3
View File
@@ -607,9 +607,8 @@ std::vector<u8> LoadSharedRomFS(const std::vector<u8>& data) {
std::vector<u8> result(ivfc.levels[2].size);
// Calculation from ctrtool
const std::size_t data_offset =
offset + Common::AlignUp(sizeof(ivfc) + ivfc.master_hash_size,
std::pow(2, ivfc.levels[2].block_size));
const std::size_t data_offset = offset + Common::AlignUp(sizeof(ivfc) + ivfc.master_hash_size,
(1 << ivfc.levels[2].block_size));
if (!CheckedMemcpy(result.data(), data, data_offset, ivfc.levels[2].size)) {
return {};
}