more sanity checks

This commit is contained in:
psucien 2025-01-01 17:27:26 +01:00
parent 0cc5808bf4
commit 827214b237

View File

@ -664,7 +664,9 @@ void load(const std::filesystem::path& path) {
if (data.contains("Keys")) { if (data.contains("Keys")) {
const toml::value& keys = data.at("Keys"); const toml::value& keys = data.at("Keys");
trophyKey = toml::find<std::vector<u8>>(keys, "TrophyKey"); if (keys.contains("TrophyKey") && keys.at("TrophyKey").is_array()) {
trophyKey = toml::find<std::vector<u8>>(keys, "TrophyKey");
}
} }
} }