mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-26 05:45:40 +01:00
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
@ -248,7 +248,8 @@ void NSP::InitializeExeFSAndRomFS(const std::vector<VirtualFile>& files) {
|
||||
|
||||
void NSP::ReadNCAs(const std::vector<VirtualFile>& 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user