From 39efa08218865f250497d7904efaf73a87ba9378 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 18 Jan 2024 20:51:35 -0300 Subject: [PATCH] fix silly error in ModMetadataimpl yet again --- loader/src/loader/ModMetadataImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loader/src/loader/ModMetadataImpl.cpp b/loader/src/loader/ModMetadataImpl.cpp index b3e7c7e8..ff1bfca9 100644 --- a/loader/src/loader/ModMetadataImpl.cpp +++ b/loader/src/loader/ModMetadataImpl.cpp @@ -183,8 +183,8 @@ Result ModMetadata::Impl::create(ModJson const& json) { ver = json["gd"].as_string(); } else if (json["gd"].is_object()) { auto key = PlatformID::toShortString(GEODE_PLATFORM_TARGET, true); - if (json["gd"].contains(key)) - ver = json["gd"][ver].as_string(); + if (json["gd"].contains(key) && json["gd"][key].is_string()) + ver = json["gd"][key].as_string(); } else { return Err("[mod.json] has invalid target GD version"); }