diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp index db96bc812..90705d4bb 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp @@ -105,7 +105,7 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons skeletonData = new(__FILE__, __LINE__) SkeletonData(); - char buffer[8] = { 0 }; + char buffer[16] = { 0 }; int lowHash = readInt(input); int hightHash = readInt(input); String hashString; @@ -745,8 +745,9 @@ Animation *SkeletonBinary::readAnimation(const String &name, DataInput *input, S Vector timelines; float scale = _scale; int numTimelines = readVarint(input, true); + SP_UNUSED(numTimelines); // 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); for (int ii = 0, nn = readVarint(input, true); ii < nn; ++ii) { unsigned char timelineType = readByte(input);