mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-02 16:49:04 +00:00
More MSVC warnings
This commit is contained in:
@@ -117,7 +117,7 @@ bool CIABuilder::Init(CIABuildType type_, const std::string& destination, TitleM
|
||||
|
||||
// TMD will be written in Finalize (we need to set content hash, etc)
|
||||
tmd_offset = Common::AlignUp(ticket_offset + header.tik_size, CIA_ALIGNMENT);
|
||||
header.tmd_size = tmd.GetSize();
|
||||
header.tmd_size = static_cast<u32_le>(tmd.GetSize());
|
||||
|
||||
content_offset = Common::AlignUp(tmd_offset + header.tmd_size, CIA_ALIGNMENT);
|
||||
header.content_size = 0;
|
||||
@@ -221,7 +221,7 @@ bool CIABuilder::WriteTicket() {
|
||||
}
|
||||
title_key = GetTitleKey(ticket);
|
||||
|
||||
header.tik_size = ticket.GetSize();
|
||||
header.tik_size = static_cast<u32_le>(ticket.GetSize());
|
||||
|
||||
file->Seek(ticket_offset, SEEK_SET);
|
||||
if (!ticket.Save(*file)) {
|
||||
|
||||
@@ -607,8 +607,9 @@ 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,
|
||||
(1 << ivfc.levels[2].block_size));
|
||||
const std::size_t data_offset =
|
||||
offset + Common::AlignUp(sizeof(ivfc) + ivfc.master_hash_size,
|
||||
(1 << static_cast<std::size_t>(ivfc.levels[2].block_size)));
|
||||
if (!CheckedMemcpy(result.data(), data, data_offset, ivfc.levels[2].size)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user