sw_engine stroke: initialize a missing variable. 18/236918/1
authorHermet Park <chuneon.park@samsung.com>
Tue, 23 Jun 2020 08:38:59 +0000 (17:38 +0900)
committerHermet Park <chuneon.park@samsung.com>
Tue, 23 Jun 2020 08:38:59 +0000 (17:38 +0900)
Change-Id: I1c3d83d56045f592ff89a5462d4de494e50c9d34

src/lib/sw_engine/tvgSwStroke.cpp

index 8b6f1ce..94a2537 100644 (file)
@@ -297,13 +297,11 @@ static void _inside(SwStroke& stroke, int32_t side, SwFixed lineLength)
     auto border = stroke.borders + side;
     auto theta = mathDiff(stroke.angleIn, stroke.angleOut) / 2;
     SwPoint delta;
-    bool intersect;
+    bool intersect = false;
 
     /* Only intersect borders if between two line_to's and both
        lines are long enough (line length is zero fur curves). */
-    if (!border->movable || lineLength == 0) {
-        intersect = false;
-    } else {
+    if (border->movable && lineLength > 0) {
         //compute minimum required length of lines
         SwFixed minLength = abs(mathMultiply(stroke.width, mathTan(theta)));
         if (stroke.lineLength >= minLength && lineLength >= minLength) intersect = true;