misc fixes found with clang's static checker.
[blender.git] / source / blender / blenkernel / intern / anim.c
index 6da9f2bbabc67d529e9c820f625bdfc5086633b3..b2feb01352e42737c652f0183e8f63e92797ee3b 100644 (file)
@@ -648,7 +648,7 @@ int where_on_path(Object *ob, float ctime, float *vec, float *dir, float *quat,
 
                totfac= data[1]+data[2];
                if(totfac>FLT_EPSILON)  interp_qt_qtqt(q2, p1->quat, p2->quat, data[2] / totfac);
-               else                                    QUATCOPY(q1, p3->quat);
+               else                                    QUATCOPY(q2, p3->quat);
 
                totfac = data[0]+data[1]+data[2]+data[3];
                if(totfac>FLT_EPSILON)  interp_qt_qtqt(quat, q1, q2, (data[1]+data[2]) / totfac);