mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-18 17:28:15 +00:00
Fixed over-allocation of buffer (#1772)
output->framePoses[frame] is over-allocated. framePoses is a 2D array: - first dimension: frames (allocated l. 4717) - second dimension: nodes (allocated l. 4731) Second dimension should be allocated of nodes_count transformations only.
This commit is contained in:

committed by
GitHub

parent
a84e98ba6c
commit
b90ac7bd31
@@ -4728,7 +4728,7 @@ static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCo
|
|||||||
// Initiate with zero bone translations
|
// Initiate with zero bone translations
|
||||||
for (int frame = 0; frame < output->frameCount; frame++)
|
for (int frame = 0; frame < output->frameCount; frame++)
|
||||||
{
|
{
|
||||||
output->framePoses[frame] = RL_MALLOC(output->frameCount*data->nodes_count*sizeof(Transform));
|
output->framePoses[frame] = RL_MALLOC(data->nodes_count*sizeof(Transform));
|
||||||
|
|
||||||
for (unsigned int i = 0; i < data->nodes_count; i++)
|
for (unsigned int i = 0; i < data->nodes_count; i++)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user