From 73fd8015f71b2578b4f26bae0fc23d61cdb0db7e Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Tue, 20 Aug 2024 12:36:14 +0200 Subject: [PATCH] lottie: fix text update The occurrence of a 'carriage return' (13) or 'end of text' (3) caused the skipping of the next character check, immediately searching for it in the list of available characters. If the next character was also 13 or 3, it led to incorrect interpretation; however, if it was the last character in the sequence, a crash occurred. --- src/loaders/lottie/tvgLottieBuilder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/loaders/lottie/tvgLottieBuilder.cpp b/src/loaders/lottie/tvgLottieBuilder.cpp index b881afcc..8d410cc6 100644 --- a/src/loaders/lottie/tvgLottieBuilder.cpp +++ b/src/loaders/lottie/tvgLottieBuilder.cpp @@ -1055,6 +1055,7 @@ void LottieBuilder::updateText(LottieLayer* layer, float frameNo) scene = Scene::gen(); cursor.x = 0.0f; cursor.y = ++line * (doc.height / scale); + continue; } //find the glyph bool found = false;