mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 23:34:53 +08:00
[spine-c] Fixed calculation of number of path constraint timelines.
* The json structure is that the path constraint timelines are added per path constraint * Instead of the number of timelines what was calculated was the number of path constraints for which we have timelines * If there were more timelines than path constraints, this led to memory corruption (writing past the buffer)
This commit is contained in:
parent
1d73c3e220
commit
0bb60cfb52
@ -162,7 +162,8 @@ static spAnimation* _spSkeletonJson_readAnimation (spSkeletonJson* self, Json* r
|
||||
timelinesCount += slotMap->size;
|
||||
timelinesCount += ik ? ik->size : 0;
|
||||
timelinesCount += transform ? transform->size : 0;
|
||||
timelinesCount += paths ? paths->size : 0;
|
||||
for (constraintMap = paths ? paths->child : 0; constraintMap; constraintMap = constraintMap->next)
|
||||
timelinesCount += constraintMap->size;
|
||||
for (constraintMap = deform ? deform->child : 0; constraintMap; constraintMap = constraintMap->next)
|
||||
for (slotMap = constraintMap->child; slotMap; slotMap = slotMap->next)
|
||||
timelinesCount += slotMap->size;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user