From 23d4d0558c1608d45b406bda027cf8162f887e0f Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Tue, 29 Apr 2014 00:48:12 +0200 Subject: [PATCH] Fixed bug loading skinned meshes. --- spine-c/src/spine/SkeletonJson.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spine-c/src/spine/SkeletonJson.c b/spine-c/src/spine/SkeletonJson.c index 5a003161b..b3f277c49 100644 --- a/spine-c/src/spine/SkeletonJson.c +++ b/spine-c/src/spine/SkeletonJson.c @@ -534,9 +534,10 @@ spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const cha vertices[i] = entry->valueFloat; for (i = 0; i < verticesCount;) { - int boneCount = (int)vertices[i++]; + int boneCount = (int)vertices[i]; mesh->bonesCount += boneCount + 1; mesh->weightsCount += boneCount * 3; + i += 1 + boneCount * 4; } mesh->bones = MALLOC(int, mesh->bonesCount); mesh->weights = MALLOC(float, mesh->weightsCount);