From 93802f587269963911c0918b0dc391d763a3afad Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 25 Feb 2021 12:08:46 +0100 Subject: [PATCH] patterns: Always interpret color attribute value as hexadecimal --- 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 4b7c08e7b..adcc7d396 100644 --- a/plugins/libimhex/source/lang/evaluator.cpp +++ b/plugins/libimhex/source/lang/evaluator.cpp @@ -333,7 +333,7 @@ namespace hex::lang { auto handleVariableAttributes = [this, &currPattern](auto attribute, auto value) { if (attribute == "color" && value.has_value()) - currPattern->setColor(hex::changeEndianess(u32(strtoul(value->data(), nullptr, 0)) << 8, std::endian::big)); + currPattern->setColor(hex::changeEndianess(u32(strtoul(value->data(), nullptr, 16)) << 8, std::endian::big)); else if (attribute == "name" && value.has_value()) currPattern->setVariableName(value->data()); else if (attribute == "comment" && value.has_value())