aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-11-14 14:16:01 -0800
committerGitHub <noreply@github.com>2022-11-14 14:16:01 -0800
commitcedc7754d96e4c53d50bcce2b2a0f139b840f3d0 (patch)
tree4ed309ec0c3419d759c0d7459c7517101e2b252e /launcher
parentfece9e207bdae16574f450593346e80f50702b00 (diff)
parent5be947291285fc8ed10852b54a647ecd338d645d (diff)
downloadPrismLauncher-cedc7754d96e4c53d50bcce2b2a0f139b840f3d0.tar.gz
PrismLauncher-cedc7754d96e4c53d50bcce2b2a0f139b840f3d0.tar.bz2
PrismLauncher-cedc7754d96e4c53d50bcce2b2a0f139b840f3d0.zip
Merge pull request #428 from DioEgizio/fixes-to-CI
Diffstat (limited to 'launcher')
-rw-r--r--launcher/minecraft/mod/tasks/LocalModParseTask.cpp2
-rw-r--r--launcher/ui/pages/modplatform/ModPage.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/launcher/minecraft/mod/tasks/LocalModParseTask.cpp b/launcher/minecraft/mod/tasks/LocalModParseTask.cpp
index a694e7b2..774f6114 100644
--- a/launcher/minecraft/mod/tasks/LocalModParseTask.cpp
+++ b/launcher/minecraft/mod/tasks/LocalModParseTask.cpp
@@ -121,7 +121,7 @@ ModDetails ReadMCModTOML(QByteArray contents)
return {};
}
auto modsTable = tomlModsTable0->as_table();
- if (!tomlModsTable0) {
+ if (!modsTable) {
qWarning() << "Corrupted mods.toml? [[mods]] was not a table!";
return {};
}
diff --git a/launcher/ui/pages/modplatform/ModPage.cpp b/launcher/ui/pages/modplatform/ModPage.cpp
index 234f9f36..677bc4d6 100644
--- a/launcher/ui/pages/modplatform/ModPage.cpp
+++ b/launcher/ui/pages/modplatform/ModPage.cpp
@@ -262,7 +262,7 @@ void ModPage::openUrl(const QUrl& url)
const QString address = url.host() + url.path();
QRegularExpressionMatch match;
- const char* page;
+ QString page;
match = modrinth.match(address);
if (match.hasMatch())
@@ -276,7 +276,7 @@ void ModPage::openUrl(const QUrl& url)
page = "curseforge";
}
- if (match.hasMatch()) {
+ if (!page.isNull()) {
const QString slug = match.captured(1);
// ensure the user isn't opening the same mod