소스 검색

Merge pull request #7866 from Hinsbart/tween_fix

Fix undefined behavior found by static code analyzer.
Rémi Verschelde 8 년 전
부모
커밋
e5cf1fe350
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      scene/animation/tween_interpolaters.cpp

+ 2 - 1
scene/animation/tween_interpolaters.cpp

@@ -262,7 +262,8 @@ namespace cubic {
 
 	static real_t out(real_t t, real_t b, real_t c, real_t d)
 	{
-		return c * ((t = t / d - 1) * t * t + 1) + b;
+		t = t / d - 1;
+		return c * (t * t * t + 1) + b;
 	}
 
 	static real_t in_out(real_t t, real_t b, real_t c, real_t d)