diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-25 09:05:04 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-25 09:05:04 +0300 |
commit | c54fecf5d9dd21dbc2b55f9a7d721f61fde034b3 (patch) | |
tree | 28d129e60e6fa3affcb278389510b5e398fd67e8 /launcher/ui | |
parent | 172680abf89e3d6312f48f0e1a6949ed4fc260be (diff) | |
download | PrismLauncher-c54fecf5d9dd21dbc2b55f9a7d721f61fde034b3.tar.gz PrismLauncher-c54fecf5d9dd21dbc2b55f9a7d721f61fde034b3.tar.bz2 PrismLauncher-c54fecf5d9dd21dbc2b55f9a7d721f61fde034b3.zip |
added condition for empty loader type
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/ui')
-rw-r--r-- | launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp | 3 | ||||
-rw-r--r-- | launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp b/launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp index 222ceedc..1403e98f 100644 --- a/launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp +++ b/launcher/ui/pages/modplatform/flame/FlameResourcePages.cpp @@ -70,7 +70,8 @@ auto FlameModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, std::optional<ModPlatform::ModLoaderTypes> loaders) const -> bool { - return ver.mcVersion.contains(mineVer) && !ver.downloadUrl.isEmpty() && (!loaders.has_value() || loaders.value() & ver.loaders); + return ver.mcVersion.contains(mineVer) && !ver.downloadUrl.isEmpty() && + (!loaders.has_value() || !ver.loaders || loaders.value() & ver.loaders); } bool FlameModPage::optedOut(ModPlatform::IndexedVersion& ver) const diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp index bcd0a4cf..a4197b22 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.cpp @@ -67,7 +67,7 @@ auto ModrinthModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, std::optional<ModPlatform::ModLoaderTypes> loaders) const -> bool { - return ver.mcVersion.contains(mineVer) && (!loaders.has_value() || loaders.value() & ver.loaders); + return ver.mcVersion.contains(mineVer) && (!loaders.has_value() || !ver.loaders || loaders.value() & ver.loaders); } ModrinthResourcePackPage::ModrinthResourcePackPage(ResourcePackDownloadDialog* dialog, BaseInstance& instance) |