From fb2ce447235905f1ec3191f2c7c3e50664a0ed54 Mon Sep 17 00:00:00 2001 From: badlogic Date: Thu, 12 Apr 2018 10:31:38 +0200 Subject: [PATCH] [c] Fixed parsing of dark slot colors for binary files. See #1097 --- spine-c/spine-c/src/spine/SkeletonBinary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-c/spine-c/src/spine/SkeletonBinary.c b/spine-c/spine-c/src/spine/SkeletonBinary.c index d4e06bc25..a753b48ca 100644 --- a/spine-c/spine-c/src/spine/SkeletonBinary.c +++ b/spine-c/spine-c/src/spine/SkeletonBinary.c @@ -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);