rlottie/parser: Fix float data parsing when data in array form. 96/206596/1
authorsubhransu mohanty <sub.mohanty@samsung.com>
Wed, 22 May 2019 03:36:04 +0000 (12:36 +0900)
committerHermet Park <hermetpark@gmail.com>
Wed, 22 May 2019 04:04:00 +0000 (13:04 +0900)
Take only the 1st element and discard the rest.

Change-Id: If02f520cf72c26f70c152746b80e33a84b11c346

src/lottie/lottieparser.cpp

index bd38fbd..1ebf44a 100644 (file)
@@ -1685,8 +1685,10 @@ void LottieParserImpl::getValue(float &val)
 {
     if (PeekType() == kArrayType) {
         EnterArray();
+        if (NextArrayValue()) val = GetDouble();
+        //discard rest
         while (NextArrayValue()) {
-            val = GetDouble();
+            GetDouble();
         }
     } else if (PeekType() == kNumberType) {
         val = GetDouble();