summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
author yidong zhang <yidong.zhang@amlogic.com> 2022-12-07 15:55:31 +0800
committer yidong zhang <yidong.zhang@amlogic.com> 2022-12-07 15:58:02 +0800
commit87bb3466407c0882ce8f20ce8e1d5d26b28da67a (patch)
tree42df7dc9990387756cab1df27549aef4aaf075d4 /cmds/bootanimation/BootAnimation.cpp
parent5bdc4b86fa743682cc926715742abce239a9efbf (diff)
bootanimation: add empty lines parsing skip for desc.txt
BUG: 259265292 Test: adb shell bootanimation Change-Id: I6bd6ed78232cef56b3f99006f4d7780eeef8b881 Signed-off-by: yidong zhang <yidong.zhang@amlogic.com>
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 33739f39aaa4..e840739399df 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -1114,6 +1114,11 @@ bool BootAnimation::parseAnimationDesc(Animation& animation) {
int nextReadPos;
+ if (strlen(l) == 0) {
+ s = ++endl;
+ continue;
+ }
+
int topLineNumbers = sscanf(l, "%d %d %d %d", &width, &height, &fps, &progress);
if (topLineNumbers == 3 || topLineNumbers == 4) {
// SLOGD("> w=%d, h=%d, fps=%d, progress=%d", width, height, fps, progress);