[cpp] Fix parsing of dark colors in skeleton binary. Closes #2170.

This commit is contained in:
Mario Zechner 2022-10-14 12:57:01 +02:00
parent 3f5e00109c
commit b1d5e7727d

View File

@ -174,10 +174,10 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons
SlotData *slotData = new (__FILE__, __LINE__) SlotData(i, String(slotName, true), *boneData);
readColor(input, slotData->getColor());
unsigned char a = readByte(input);
unsigned char r = readByte(input);
unsigned char g = readByte(input);
unsigned char b = readByte(input);
unsigned char a = readByte(input);
if (!(r == 0xff && g == 0xff && b == 0xff && a == 0xff)) {
slotData->getDarkColor().set(r / 255.0f, g / 255.0f, b / 255.0f, 1);
slotData->setHasDarkColor(true);