Skip to content

Commit

Permalink
Merge pull request #15 from jakcron/v0.6.0-release
Browse files Browse the repository at this point in the history
libpietendo v0.6.0 Release
  • Loading branch information
jakcron authored Apr 24, 2023
2 parents 3e5feb4 + 3eba8c6 commit 1846763
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = libpietendo
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v0.5.0
PROJECT_NUMBER = v0.6.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
12 changes: 11 additions & 1 deletion include/pietendo/ctr/cci.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,20 @@ struct NcsdCommonHeader

struct GameCardExtendedHeader
{
struct CryptoType
{
byte_t enabled : 1;
byte_t value : 2;
byte_t reserved : 5;
};

// 0x90
std::array<tc::bn::le64<uint64_t>, kPartitionNum> partition_id;
// 0xD0
tc::bn::pad<0x30> reserved;
tc::bn::pad<0x2E> reserved;
// 0xFE
CryptoType crypto_type;
byte_t backup_security_version;
};

struct NandExtendedHeader
Expand Down
2 changes: 1 addition & 1 deletion src/ctr/ExeFsSnapshotGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pie::ctr::ExeFsSnapshotGenerator::ExeFsSnapshotGenerator(const std::shared_ptr<t
stream->seek(0, tc::io::SeekOrigin::Begin);
stream->read((byte_t*)(&hdr), sizeof(pie::ctr::ExeFsHeader));

if (hdr.file_table[0].name[0] == 0 || hdr.file_table[0].offset.unwrap() != 0 || hdr.hash_table[pie::ctr::ExeFsHeader::kFileNum - 1][0] == 0)
if (hdr.file_table[0].name[0] == 0 || hdr.file_table[0].offset.unwrap() != 0)
{
throw tc::ArgumentOutOfRangeException("pie::ctr::ExeFsSnapshotGenerator", "ExeFsHeader is corrupted (Bad first entry).");
}
Expand Down
4 changes: 2 additions & 2 deletions src/hac/NsoHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ void pie::hac::NsoHeader::fromBytes(const byte_t* data, size_t len)
mDataSegmentInfo.file_layout.size = hdr->data_file_size.unwrap();
mDataSegmentInfo.memory_layout.offset = hdr->data.memory_offset.unwrap();
mDataSegmentInfo.memory_layout.size = hdr->data.size.unwrap();
mDataSegmentInfo.is_compressed = hdr->flags.test((size_t)nso::HeaderFlags_RoCompress);
mDataSegmentInfo.is_hashed = hdr->flags.test((size_t)nso::HeaderFlags_RoHash);
mDataSegmentInfo.is_compressed = hdr->flags.test((size_t)nso::HeaderFlags_DataCompress);
mDataSegmentInfo.is_hashed = hdr->flags.test((size_t)nso::HeaderFlags_DataHash);
mDataSegmentInfo.hash = hdr->data_hash;

mModuleNameInfo.offset = hdr->module_name_offset.unwrap();
Expand Down

0 comments on commit 1846763

Please sign in to comment.