lottie/text: hotfix for parsing text range issue

If randomize is not enabled, "rn" prop falls into skip()
This commit is contained in:
Jinny You 2024-09-19 14:35:14 +09:00 committed by Hermet Park
parent 1fe9f269b1
commit b9b1336817

View file

@ -1123,7 +1123,7 @@ void LottieParser::parseTextRange(LottieText* text)
else if (KEY_AS("ne")) parseProperty<LottieProperty::Type::Float>(selector->minEase); else if (KEY_AS("ne")) parseProperty<LottieProperty::Type::Float>(selector->minEase);
else if (KEY_AS("a")) parseProperty<LottieProperty::Type::Float>(selector->maxAmount); else if (KEY_AS("a")) parseProperty<LottieProperty::Type::Float>(selector->maxAmount);
else if (KEY_AS("b")) selector->based = (LottieTextRange::Based) getInt(); else if (KEY_AS("b")) selector->based = (LottieTextRange::Based) getInt();
else if (KEY_AS("rn") && getInt()) selector->random = rand(); else if (KEY_AS("rn")) selector->random = getInt() ? rand() : 0;
else if (KEY_AS("sh")) selector->shape = (LottieTextRange::Shape) getInt(); else if (KEY_AS("sh")) selector->shape = (LottieTextRange::Shape) getInt();
else if (KEY_AS("o")) parseProperty<LottieProperty::Type::Float>(selector->offset); else if (KEY_AS("o")) parseProperty<LottieProperty::Type::Float>(selector->offset);
else if (KEY_AS("r")) selector->rangeUnit = (LottieTextRange::Unit) getInt(); else if (KEY_AS("r")) selector->rangeUnit = (LottieTextRange::Unit) getInt();