submisson_package: Fix edge case with improperly sized filenames
Prevents a crash if the filename is less than 9 characters long.
This commit is contained in:
parent
08c0783d34
commit
0a8e540681
1 changed files with 2 additions and 1 deletions
|
@ -248,7 +248,8 @@ void NSP::InitializeExeFSAndRomFS(const std::vector<VirtualFile>& files) {
|
||||||
|
|
||||||
void NSP::ReadNCAs(const std::vector<VirtualFile>& files) {
|
void NSP::ReadNCAs(const std::vector<VirtualFile>& files) {
|
||||||
for (const auto& outer_file : files) {
|
for (const auto& outer_file : files) {
|
||||||
if (outer_file->GetName().substr(outer_file->GetName().size() - 9) != ".cnmt.nca") {
|
if (outer_file->GetName().size() < 9 ||
|
||||||
|
outer_file->GetName().substr(outer_file->GetName().size() - 9) != ".cnmt.nca") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue