From 9a97c6c32818e0842b4f25fde784e59e6dac391a Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 21 Jan 2021 18:01:52 +0100 Subject: [PATCH] Use big endian rgb8 color for color attribute --- plugins/libimhex/source/lang/evaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/libimhex/source/lang/evaluator.cpp b/plugins/libimhex/source/lang/evaluator.cpp index bf4a550e6..0f651d06b 100644 --- a/plugins/libimhex/source/lang/evaluator.cpp +++ b/plugins/libimhex/source/lang/evaluator.cpp @@ -339,7 +339,7 @@ namespace hex::lang { auto handleVariableAttributes = [this, &currPattern](auto attribute, auto value) { if (attribute == "color") - currPattern->setColor(strtoul(value.data(), nullptr, 0)); + currPattern->setColor(hex::changeEndianess(u32(strtoul(value.data(), nullptr, 0)) << 8, std::endian::big)); else if (attribute == "name") currPattern->setVariableName(value.data()); else