[c] IK bend direction had a sign conversion issue in SkeletonBinary when using -funsigned-char. Closes #794.

This commit is contained in:
badlogic 2016-12-05 18:24:20 +01:00
parent ac7979721a
commit 27bd17f067

View File

@ -36,7 +36,7 @@
#include "kvec.h" #include "kvec.h"
typedef struct { typedef struct {
const unsigned char* cursor; const unsigned char* cursor;
const unsigned char* end; const unsigned char* end;
} _dataInput; } _dataInput;
@ -373,7 +373,7 @@ static spAnimation* _spSkeletonBinary_readAnimation (spSkeletonBinary* self, con
for (frameIndex = 0; frameIndex < frameCount; ++frameIndex) { for (frameIndex = 0; frameIndex < frameCount; ++frameIndex) {
float time = readFloat(input); float time = readFloat(input);
float mix = readFloat(input); float mix = readFloat(input);
char bendDirection = readSByte(input); signed char bendDirection = readSByte(input);
spIkConstraintTimeline_setFrame(timeline, frameIndex, time, mix, bendDirection); spIkConstraintTimeline_setFrame(timeline, frameIndex, time, mix, bendDirection);
if (frameIndex < frameCount - 1) readCurve(input, SUPER(timeline), frameIndex); if (frameIndex < frameCount - 1) readCurve(input, SUPER(timeline), frameIndex);
} }