summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/submission_package.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* submission_package: Avoid dangling std::string_view within SetTicketKeys()Lioncash2018-10-031-2/+5
| | | | | | | | 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.
* submission_package: Correct location of null check within SetTicketKeys()Lioncash2018-10-031-3/+6
| | | | | 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.
* submission_package: Use std::string's rfind() when looking for the extension in InitializeExeFSAndRomFS()Lioncash2018-10-031-1/+1
| | | | | | | 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.
* submission_package: Ensure the 'extracted' member variable is always initializedLioncash2018-10-031-2/+0
| | | | | | | | 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.
* submission_package: Move ExeFS and RomFS initialization to its own functionLioncash2018-10-031-10/+17
| | | | | | | | | | 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.
* submission_package: Move NCA reading code to its own functionLioncash2018-10-031-43/+46
| | | | | | 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.
* submission_package: Move ticket key setting to its own functionLioncash2018-10-031-21/+28
| | | | | This behavior is entirely independent of the surrounding code, so it can be put in its own function to keep the behavior separate.
* submission_package: Invert conditionals within NSP's constructor to reduce nestingLioncash2018-10-031-45/+49
| | | | We can use early continues here to reduce the amount of nesting.
* Merge pull request #1242 from lioncash/file-sysbunnei2018-09-061-3/+9
|\ | | | | file_sys/submission_package: Replace includes with forward declarations where applicable
| * file_sys/submission_package: Correct constructor initialization list orderLioncash2018-09-051-2/+2
| | | | | | | | | | Orders the elements in the sequence to match the order in which they'll actually be initialized in.
| * file_sys/submission_package: Replace includes with forward declarations where applicableLioncash2018-09-051-1/+7
| |
* | nsp: Fix error masking issue with XCI filesZach Hilman2018-09-041-1/+4
|/ | | | Now display correct error instead of catch-all MissingProgramNCA
* main: Only show DRD deprecation warning onceZach Hilman2018-09-041-0/+1
|
* nsp: Comply with style and performance guidelinesZach Hilman2018-09-041-24/+33
|
* file_sys: Add Nintendo Submission Package (NSP)Zach Hilman2018-09-041-0/+226