lottie/vector: fixed the crash in bezier::length() api. 58/193058/1
authorsubhransu mohanty <sub.mohanty@samsung.com>
Wed, 14 Nov 2018 07:36:04 +0000 (16:36 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Wed, 14 Nov 2018 07:37:38 +0000 (16:37 +0900)
Change-Id: I397ecdc65382bd30174bc95ff34063384d12972b

src/vector/vbezier.cpp

index bc31fa2e88fbff7f7b6f9e76cdb0e7a1567e3284..d33d235234bc621db63266672ea13a9a702f35ac 100644 (file)
@@ -32,7 +32,7 @@ float VBezier::length() const
 
     chord = VLine::length(x1, y1, x4, y4);
 
-    if (!vCompare(len, chord)) {
+    if ((len - chord) > 0.01) {
         split(&left, &right);    /* split in two */
         length = left.length() + /* try left side */
                  right.length(); /* try right side */