| Age | Commit message (Collapse) | Author |
|
crypto: Add support for full key derivation
|
|
ips_layer: Silence truncation and conversion warnings
|
|
patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptr
|
|
GetControlMetadata() instead of a std::shared_ptr
Neither of these functions require the use of shared ownership of the
returned pointer. This makes it more difficult to create reference
cycles with, and makes the interface more generic, as std::shared_ptr
instances can be created from a std::unique_ptr, but the vice-versa
isn't possible. This also alters relevant functions to take NCA
arguments by const reference rather than a const reference to a
std::shared_ptr. These functions don't alter the ownership of the memory
used by the NCA instance, so we can make the interface more generic by
not assuming anything about the type of smart pointer the NCA is
contained within and make it the caller's responsibility to ensure the
supplied NCA is valid.
|
|
We can just compare the existing std::vector instance with a constexpr
std::array containing the desired match. This is lighter resource-wise,
as we don't need to allocate on the heap.
|
|
Makes the layout of the array consistent, by making all elements match,
instead of special-casing the first one.
|
|
Adds missing includes to prevent potential compilation issues in the
future. Also moves the definition of a struct into the cpp file, so that
some includes don't need to be introduced within the header.
|
|
We don't need to make a copy of the read data, so we can std::move it
into the make_shared call here.
|
|
Makes type conversions explicit to avoid compiler warnings.
|
|
fsmitm_romfsbuild: Add support for stubbing and IPS patches in LFS
|
|
ips_layer: Add support for IPSwitch executable patches
|
|
|
|
|
|
Reads as Update (NSP) in add-ons
|
|
Will prefer any installed update over the packed version.
|
|
|
|
|
|
|
|
Specifically bugs/crashes that arise when putting them in positions that are legal but not typical, such as midline, between patch data, or between patch records.
|
|
|
|
More accurately follows IPSwitch specification.
|
|
|
|
|
|
file_sys: Add support for loading IPS patches
|
|
submission_package: Cleanup and bug fixes
|
|
card_image: Ensure program_nca_status is always initialized
|
|
GetName() returns a std::string by value, not by reference, so after the
std::string_view is constructed, it's not well defined to actually
execute any member functions of std::string_view that attempt to access
the data, as the std::string has already been destroyed. Instead, we can
just use a std::string and erase the last four characters.
|
|
If a ticket file was ever a null pointer, we'd cause a null pointer
dereference, as we were calling GetExtension() on the pointer instance.
|
|
in InitializeExeFSAndRomFS()
When searching for a file extension, it's generally preferable to begin
the search at the end of the string rather than the beginning, as the
whole string isn't going to be walked just to check for something at the
end of it.
|
|
If an error occurs when constructing the PartitionFilesystem instance,
the constructor would be exited early, which wouldn't initialize the
extracted data member, making it possible for other code to perform an
uninitialized read by calling the public IsExtractedType() member
function. This prevents that.
|
|
Like the other two bits of factored out code, this can also be put
within its own function. We can also modify the code so that it accepts
a const reference to a std::vector of files, this way, we can
deduplicate the file retrieval.
Now the constructor for NSP isn't a combination of multiple behaviors in
one spot. It's nice and separate.
|
|
This too, is completely separate behavior from what is in the
constructor, so we can move this to its own isolated function to keep
everything self-contained.
|
|
This behavior is entirely independent of the surrounding code, so it can
be put in its own function to keep the behavior separate.
|
|
nesting
We can use early continues here to reduce the amount of nesting.
|
|
If any of the error paths before the NCA retrieval are taken, it'll
result in program_nca_status being left in an inconsistent state. So we
initialize it by default with a value indicating an error.
|
|
Avoid resource-heavy classes and remove quasi-duplicated code.
|
|
While PatchExeFS operated on the entire directory, this function operates on the uncompressed NSO. Avoids copying decompression code to PatchManager.
|
|
|
|
|
|
|
|
Command #5
|
|
Previous behavior was to assert. Seems to mirror expected game behavior.
|
|
|
|
Makes the public interface consistent in terms of how accesses are done
on a process object. It also makes it slightly nicer to reason about the
logic of the process class, as we don't want to expose everything to
external code.
|
|
process/vm_manager: Initial modifications to load NPDM metadata
|
|
Avoids making copies of large std::vector instances where it's trivially
avoidable to do so.
|
|
Theres no need to do explicit bitwise arithmetic here, when we have a
function that does this with a more descriptive name.
|
|
Avoids the need to nest code quite a bit by early-exiting in error
cases.
|
|
initializer list
Orders the initializer list members to be in the same order that they
would be initialized in. Avoids compiler warnings.
|
|
Cast where explicitly necessary and in other cases we can simply modify
the algorithm to accomodate larger data.
|