From 0fa16936d16f3e57b786adf2fec5df4fb71c46f4 Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Wed, 22 May 2019 12:36:04 +0900 Subject: [PATCH] rlottie/parser: Fix float data parsing when data in array form. Take only the 1st element and discard the rest. --- src/lottie/lottieparser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lottie/lottieparser.cpp b/src/lottie/lottieparser.cpp index bd38fbd0c1..1ebf44a416 100644 --- a/src/lottie/lottieparser.cpp +++ b/src/lottie/lottieparser.cpp @@ -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();