mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 12:12:50 +01:00
Patches: do not allow empty patch names
This commit is contained in:
parent
482722af0a
commit
a19883f875
@ -252,6 +252,13 @@ bool patch_engine::load(patch_map& patches_map, const std::string& path, std::st
|
|||||||
// Each key in "Patches" is also the patch description
|
// Each key in "Patches" is also the patch description
|
||||||
const std::string& description = patches_entry.first.Scalar();
|
const std::string& description = patches_entry.first.Scalar();
|
||||||
|
|
||||||
|
if (description.empty())
|
||||||
|
{
|
||||||
|
append_log_message(log_messages, fmt::format("Error: Empty patch name (key: %s, location: %s, file: %s)", main_key, get_yaml_node_location(patches_entry.first), path), &patch_log.error);
|
||||||
|
is_valid = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Compile patch information
|
// Compile patch information
|
||||||
|
|
||||||
if (const auto yml_type = patches_entry.second.Type(); yml_type != YAML::NodeType::Map)
|
if (const auto yml_type = patches_entry.second.Type(); yml_type != YAML::NodeType::Map)
|
||||||
|
Loading…
Reference in New Issue
Block a user