1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-26 22:12:53 -05:00

Merge xmrig v6.22.0 into master

This commit is contained in:
MoneroOcean
2024-08-12 00:05:37 +03:00
41 changed files with 4531 additions and 4174 deletions

View File

@@ -211,11 +211,13 @@ rapidjson::Value xmrig::Json::normalize(double value, bool zero)
{
using namespace rapidjson;
if (!std::isnormal(value)) {
const double value_rounded = floor(value * 100.0) / 100.0;
if (!std::isnormal(value) || !std::isnormal(value_rounded)) {
return zero ? Value(0.0) : Value(kNullType);
}
return Value(floor(value * 100.0) / 100.0);
return Value(value_rounded);
}