From aa8b8b684f7c5f6edd86049eab22b5ee5bc15dbe Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Sun, 11 Dec 2016 00:34:09 +0700 Subject: [PATCH] Using at() instead of operator[] in currentFrame to get more precise crashes --- Source/Person.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Person.h b/Source/Person.h index ebdde32..cb62622 100644 --- a/Source/Person.h +++ b/Source/Person.h @@ -328,8 +328,8 @@ public: inline Joint& joint(int bodypart) { return skeleton.joints[skeleton.jointlabels[bodypart]]; } inline XYZ& jointPos(int bodypart) { return joint(bodypart).position; } inline XYZ& jointVel(int bodypart) { return joint(bodypart).velocity; } - inline AnimationFrame& currentFrame() { return Animation::animations[animCurrent].frames[frameCurrent]; } - inline AnimationFrame& targetFrame() { return Animation::animations[animTarget].frames[frameTarget]; } + inline AnimationFrame& currentFrame() { return Animation::animations.at(animCurrent).frames.at(frameCurrent); } + inline AnimationFrame& targetFrame() { return Animation::animations.at(animTarget).frames.at(frameTarget); } void CheckKick(); -- 2.39.5