From 0226f3d047957f78d783ce381c28edf82be37ddb Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 9 Oct 2021 23:38:00 +0200 Subject: [PATCH] patterns: Fixed `color` attribute taking BGR instead of RGB --- plugins/libimhex/include/hex/pattern_language/ast_node.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/libimhex/include/hex/pattern_language/ast_node.hpp b/plugins/libimhex/include/hex/pattern_language/ast_node.hpp index 731f0274f..b5ac7d5b3 100644 --- a/plugins/libimhex/include/hex/pattern_language/ast_node.hpp +++ b/plugins/libimhex/include/hex/pattern_language/ast_node.hpp @@ -594,7 +594,7 @@ namespace hex::pl { if (name == "color" && requiresValue()) { u32 color = strtoul(value->c_str(), nullptr, 16); - pattern->setColor(color); + pattern->setColor(hex::changeEndianess(color, std::endian::big) >> 8); } else if (name == "name" && requiresValue()) { pattern->setVariableName(*value); } else if (name == "comment" && requiresValue()) {