mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-24 18:01:21 -08: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) {
|
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 New Issue
Block a user