Interpret negative values in game patches
This commit is contained in:
@@ -496,6 +496,11 @@ bool patch_engine::add_patch_data(YAML::Node node, patch_info& info, u32 modifie
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
p_data.value.long_value = get_yaml_node_value<u64>(value_node, error_message);
|
p_data.value.long_value = get_yaml_node_value<u64>(value_node, error_message);
|
||||||
|
if (error_message.find("bad conversion") != std::string::npos)
|
||||||
|
{
|
||||||
|
error_message = "";
|
||||||
|
p_data.value.long_value = get_yaml_node_value<s64>(value_node, error_message);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,5 +78,6 @@ std::string get_yaml_node_location(YAML::Node node)
|
|||||||
|
|
||||||
template u32 get_yaml_node_value<u32>(YAML::Node, std::string&);
|
template u32 get_yaml_node_value<u32>(YAML::Node, std::string&);
|
||||||
template u64 get_yaml_node_value<u64>(YAML::Node, std::string&);
|
template u64 get_yaml_node_value<u64>(YAML::Node, std::string&);
|
||||||
|
template s64 get_yaml_node_value<s64>(YAML::Node, std::string&);
|
||||||
template f64 get_yaml_node_value<f64>(YAML::Node, std::string&);
|
template f64 get_yaml_node_value<f64>(YAML::Node, std::string&);
|
||||||
template cheat_info get_yaml_node_value<cheat_info>(YAML::Node, std::string&);
|
template cheat_info get_yaml_node_value<cheat_info>(YAML::Node, std::string&);
|
||||||
|
|||||||
Reference in New Issue
Block a user