瀏覽代碼

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.
pull/1774/head
Guillaume DEVOILLE 3 年之前
committed by GitHub
父節點
當前提交
b90ac7bd31
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/models.c

+ 1
- 1
src/models.c 查看文件

@ -4728,7 +4728,7 @@ static ModelAnimation *LoadGLTFModelAnimations(const char *fileName, int *animCo
// Initiate with zero bone translations
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++)
{

Loading…
取消
儲存