From 343694329f31dc540090857e2ce08ef4bbce4421 Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 18 Apr 2020 00:16:50 +0200 Subject: [PATCH] little hanim fix --- src/hanim.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hanim.cpp b/src/hanim.cpp index 01e8737..5a0b46e 100644 --- a/src/hanim.cpp +++ b/src/hanim.cpp @@ -167,6 +167,7 @@ HAnimHierarchy::updateMatrices(void) else rootMat.setIdentity(); parentMat = &rootMat; + *sp++ = parentMat; HAnimNodeInfo *node = this->nodeInfo; for(i = 0; i < this->numNodes; i++){ anim->applyCB(&animMat, anim->getInterpFrame(i)); @@ -177,6 +178,8 @@ HAnimHierarchy::updateMatrices(void) parentMat = curMat; if(node->flags & POP) parentMat = *--sp; + assert(sp >= stack); + assert(sp <= &stack[64]); node++; curMat++;