Merge pull request #6179 from JosJuice/extract-forbidden-characters

Avoid forbidden characters when extracting disc partitions
This commit is contained in:
Anthony 2017-11-08 15:32:35 -08:00 committed by GitHub
commit 356896d8bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ std::string DirectoryNameForPartitionType(u32 partition_type)
static_cast<char>((partition_type >> 8) & 0xFF),
static_cast<char>(partition_type & 0xFF)};
if (std::all_of(type_as_game_id.cbegin(), type_as_game_id.cend(),
[](char c) { return std::isprint(c, std::locale::classic()); }))
[](char c) { return std::isalnum(c, std::locale::classic()); }))
{
return "P-" + type_as_game_id;
}