aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth/Parsers.cpp
diff options
context:
space:
mode:
authorTheCodex6824 <thecodex6824@gmail.com>2022-04-23 11:11:55 -0400
committerTheCodex6824 <thecodex6824@gmail.com>2022-04-23 11:11:55 -0400
commita0bafa49520195512c388ebe8d5e5b307d0a10be (patch)
treee8c5211ddab96565b0ba4bf014d0cf204404a6d4 /launcher/minecraft/auth/Parsers.cpp
parente56f0db11bc096909bc17eac1a5cdf5de06817dc (diff)
downloadPrismLauncher-a0bafa49520195512c388ebe8d5e5b307d0a10be.tar.gz
PrismLauncher-a0bafa49520195512c388ebe8d5e5b307d0a10be.tar.bz2
PrismLauncher-a0bafa49520195512c388ebe8d5e5b307d0a10be.zip
Re-add base64 decode option for Qt versions that support it
Diffstat (limited to 'launcher/minecraft/auth/Parsers.cpp')
-rw-r--r--launcher/minecraft/auth/Parsers.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/launcher/minecraft/auth/Parsers.cpp b/launcher/minecraft/auth/Parsers.cpp
index 60458b9b..ea882b56 100644
--- a/launcher/minecraft/auth/Parsers.cpp
+++ b/launcher/minecraft/auth/Parsers.cpp
@@ -213,8 +213,8 @@ bool parseMinecraftProfile(QByteArray & data, MinecraftProfile &output) {
}
namespace {
- // these skin URLs are for the MHF_Steve and MHF_Alex accounts (made by a Mojang employee)
- // they are needed because the session server doesn't return skin urls for default skins
+ // these skin URLs are for the MHF_Steve and MHF_Alex accounts (made by a Mojang employee)
+ // they are needed because the session server doesn't return skin urls for default skins
static const QString SKIN_URL_STEVE = "http://textures.minecraft.net/texture/1a4af718455d4aab528e7a61f86fa25e6a369d1768dcb13f7df319a713eb810b";
static const QString SKIN_URL_ALEX = "http://textures.minecraft.net/texture/83cee5ca6afcdb171285aa00e8049c297b2dbeba0efb8ff970a5677a1b644032";
@@ -307,7 +307,11 @@ bool parseMinecraftProfileMojang(QByteArray & data, MinecraftProfile &output) {
auto value = pObj.value("value");
if (value.isString()) {
+#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
+ texturePayload = QByteArray::fromBase64(value.toString().toUtf8(), QByteArray::AbortOnBase64DecodingErrors);
+#else
texturePayload = QByteArray::fromBase64(value.toString().toUtf8());
+#endif
}
if (!texturePayload.isEmpty()) {