summaryrefslogtreecommitdiff
path: root/src/resources/dye.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/dye.cpp')
-rw-r--r--src/resources/dye.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp
index 316dff9f3..df26ec1b7 100644
--- a/src/resources/dye.cpp
+++ b/src/resources/dye.cpp
@@ -54,8 +54,9 @@ DyePalette::DyePalette(const std::string &description, int8_t blockSize)
for (int i = 0, colorIdx = 0; i < blockSize && colorIdx < dyePalateSize;
i +=2, colorIdx ++)
{
- color.value[colorIdx] = (hexDecode(description[pos + i]) << 4)
- + hexDecode(description[pos + i + 1]);
+ color.value[colorIdx] = static_cast<unsigned char>((
+ hexDecode(description[pos + i]) << 4)
+ + hexDecode(description[pos + i + 1]));
}
mColors.push_back(color);
pos += blockSize;