[cpp] 4.0 porting, fix SkeletonBinary.

This commit is contained in:
badlogic 2021-03-05 16:37:47 +01:00
parent 3a503336bf
commit 1a928d9c65

View File

@ -105,7 +105,7 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons
skeletonData = new(__FILE__, __LINE__) SkeletonData(); skeletonData = new(__FILE__, __LINE__) SkeletonData();
char buffer[8] = { 0 }; char buffer[16] = { 0 };
int lowHash = readInt(input); int lowHash = readInt(input);
int hightHash = readInt(input); int hightHash = readInt(input);
String hashString; String hashString;
@ -745,8 +745,9 @@ Animation *SkeletonBinary::readAnimation(const String &name, DataInput *input, S
Vector<Timeline *> timelines; Vector<Timeline *> timelines;
float scale = _scale; float scale = _scale;
int numTimelines = readVarint(input, true); int numTimelines = readVarint(input, true);
SP_UNUSED(numTimelines);
// Slot timelines. // Slot timelines.
for (int i = 0, n = numTimelines; i < n; ++i) { for (int i = 0, n = readVarint(input, true); i < n; ++i) {
int slotIndex = readVarint(input, true); int slotIndex = readVarint(input, true);
for (int ii = 0, nn = readVarint(input, true); ii < nn; ++ii) { for (int ii = 0, nn = readVarint(input, true); ii < nn; ++ii) {
unsigned char timelineType = readByte(input); unsigned char timelineType = readByte(input);