From 55e2b0f5205f3be3a60a8a4b0093855a27f23af0 Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Mon, 5 Jan 2026 19:56:43 +0100 Subject: [PATCH] fix float parsing (#3896) --- src/common/memory_patcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/memory_patcher.cpp b/src/common/memory_patcher.cpp index 045a530cb..ad737dab4 100644 --- a/src/common/memory_patcher.cpp +++ b/src/common/memory_patcher.cpp @@ -51,14 +51,14 @@ std::string convertValueToHex(const std::string type, const std::string valueStr uint32_t i; } floatUnion; floatUnion.f = std::stof(valueStr); - result = toHex(floatUnion.i, sizeof(floatUnion.i)); + result = toHex(std::byteswap(floatUnion.i), sizeof(floatUnion.i)); } else if (type == "float64") { union { double d; uint64_t i; } doubleUnion; doubleUnion.d = std::stod(valueStr); - result = toHex(doubleUnion.i, sizeof(doubleUnion.i)); + result = toHex(std::byteswap(doubleUnion.i), sizeof(doubleUnion.i)); } else if (type == "utf8") { std::vector byteArray = std::vector(valueStr.begin(), valueStr.end());