sw_engine: fix data overflow case.

Change-Id: I01f90a8a6b3bca38142c8c16d1990b5b1a09d081
This commit is contained in:
Hermet Park 2020-08-13 19:27:02 +09:00
parent 7b004363f9
commit 3dc3cfd8c0

View file

@ -35,7 +35,7 @@ static constexpr auto SW_STROKE_TAG_END = 8;
static inline SwFixed SIDE_TO_ROTATE(const int32_t s)
{
return (SW_ANGLE_PI2 - (s) * SW_ANGLE_PI);
return (SW_ANGLE_PI2 - static_cast<SwFixed>(s) * SW_ANGLE_PI);
}