mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-19 19:15:26 +00:00
Qt/patches: check if serial is 9 characters long and alphanumeric
This commit is contained in:
parent
d05d803f5e
commit
93424d1adc
1 changed files with 6 additions and 0 deletions
|
@ -330,6 +330,12 @@ bool patch_engine::load(patch_map& patches_map, const std::string& path, std::st
|
|||
is_valid = false;
|
||||
continue;
|
||||
}
|
||||
else if (serial.size() != 9 || !std::all_of(serial.begin(), serial.end(), [](char c) { return std::isalnum(c); }))
|
||||
{
|
||||
append_log_message(log_messages, fmt::format("Error: Serial '%s' invalid (patch: %s, key: %s, location: %s, file: %s)", serial, description, main_key, get_yaml_node_location(serial_node), path), &patch_log.error);
|
||||
is_valid = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (const auto yml_type = serial_node.second.Type(); yml_type != YAML::NodeType::Sequence)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue