aboutsummaryrefslogtreecommitdiff
path: root/primedev/mods
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2024-01-19 23:42:35 +0100
committerGeckoEidechse <gecko.eidechse+git@pm.me>2024-01-19 23:42:35 +0100
commit54532ae1ba82c106c2c510a9cbde7b6f1c3b7c1d (patch)
treef4e3268d8eceed0b9fa03dec72dd3d40f10de2e7 /primedev/mods
parentf2dd1583ef87a8d61f206de80f6ef3aa47d92b17 (diff)
downloadNorthstarLauncher-54532ae1ba82c106c2c510a9cbde7b6f1c3b7c1d.tar.gz
NorthstarLauncher-54532ae1ba82c106c2c510a9cbde7b6f1c3b7c1d.zip
temp: Commit working tree
Diffstat (limited to 'primedev/mods')
-rw-r--r--primedev/mods/autodownload/moddownloader.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/primedev/mods/autodownload/moddownloader.cpp b/primedev/mods/autodownload/moddownloader.cpp
index 165399e3..5d3e9254 100644
--- a/primedev/mods/autodownload/moddownloader.cpp
+++ b/primedev/mods/autodownload/moddownloader.cpp
@@ -88,7 +88,14 @@ void ModDownloader::FetchModsListFromAPI()
// Load mods list into local state
spdlog::info("Loading mods configuration...");
verifiedModsJson.Parse(readBuffer);
- for (auto i = verifiedModsJson.MemberBegin(); i != verifiedModsJson.MemberEnd(); ++i)
+ assert(verifiedModsJson.HasMember("thunderstore"));
+
+ // Check if the "thunderstore" key exists
+ auto verifiedModsJsonThunderstore = verifiedModsJson["thunderstore"];
+
+ assert(verifiedModsJsonThunderstore->value.IsObject());
+
+ for (auto i = verifiedModsJsonThunderstore.MemberBegin(); i != verifiedModsJsonThunderstore.MemberEnd(); ++i)
{
std::string name = i->name.GetString();
std::string dependency = i->value["DependencyPrefix"].GetString();