From df83d7283753ea54a1b3629b5fd07a01dcb2c67e Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 1 Jul 2021 01:16:16 +0000 Subject: [PATCH] Fix morph target issue where more than 4 targets were not interpolating correctly. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5926 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- plugins/models/gltf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/models/gltf.c b/plugins/models/gltf.c index c56d24514..1a39a15fb 100644 --- a/plugins/models/gltf.c +++ b/plugins/models/gltf.c @@ -2923,7 +2923,7 @@ static void LerpAnimData(const struct gltf_animsampler *samp, float time, float { float t0, t1; float w0, w1; - float v0[4], v1[4]; + float v0[max(4,MAX_MORPHWEIGHTS)], v1[max(4,MAX_MORPHWEIGHTS)]; int f0, f1, c; const struct gltf_accessor *in = &samp->input;