[c] Fixed parsing of dark slot colors for binary files. See #1097

This commit is contained in:
badlogic 2018-04-12 10:31:38 +02:00
parent e25989ca6d
commit fb2ce44723

View File

@ -928,11 +928,11 @@ spSkeletonData* spSkeletonBinary_readSkeletonData (spSkeletonBinary* self, const
/* TODO Avoid copying of slotName */
spSlotData* slotData = spSlotData_create(i, slotName, boneData);
FREE(slotName);
readColor(input, &slotData->color.r, &slotData->color.g, &slotData->color.b, &slotData->color.a);
readColor(input, &slotData->color.r, &slotData->color.g, &slotData->color.b, &slotData->color.a);
a = readByte(input);
r = readByte(input);
g = readByte(input);
b = readByte(input);
a = readByte(input);
if (!(r == 0xff && g == 0xff && b == 0xff && a == 0xff)) {
slotData->darkColor = spColor_create();
spColor_setFromFloats(slotData->darkColor, r / 255.0f, g / 255.0f, b / 255.0f, 1);