1
0
mirror of synced 2024-11-28 01:20:51 +01:00

patterns: Always interpret color attribute value as hexadecimal

This commit is contained in:
WerWolv 2021-02-25 12:08:46 +01:00
parent 205d88cd23
commit 93802f5872

View File

@ -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())