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"); }