1
0
mirror of synced 2025-02-20 04:01:01 +01:00

Use big endian rgb8 color for color attribute

This commit is contained in:
WerWolv 2021-01-21 18:01:52 +01:00
parent e04511269a
commit 9a97c6c328

View File

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