diff --git a/src/common/crypto/Algorithm.cpp b/src/common/crypto/Algorithm.cpp index 3123c361e..168468f48 100644 --- a/src/common/crypto/Algorithm.cpp +++ b/src/common/crypto/Algorithm.cpp @@ -127,6 +127,7 @@ void xmrig::Algorithm::parseAlgorithm(const char *algo) void xmrig::Algorithm::parseVariant(const char *variant) { if (m_algo == CRYPTONIGHT_HEAVY) { + m_variant = VARIANT_0; return; } diff --git a/src/common/net/Client.cpp b/src/common/net/Client.cpp index c53397a34..921fa618b 100644 --- a/src/common/net/Client.cpp +++ b/src/common/net/Client.cpp @@ -274,7 +274,14 @@ bool Client::parseJob(const rapidjson::Value ¶ms, int *code) } if (params.HasMember("variant")) { - job.algorithm().parseVariant(params["variant"].GetInt()); + const rapidjson::Value &variant = params["variant"]; + + if (variant.IsInt()) { + job.algorithm().parseVariant(variant.GetInt()); + } + else if (variant.IsString()){ + job.algorithm().parseVariant(variant.GetString()); + } } if (!verifyAlgorithm(job.algorithm())) {