diff --git a/src/loaders/lottie/tvgLottieBuilder.cpp b/src/loaders/lottie/tvgLottieBuilder.cpp index 2faaeac8..ceda2070 100644 --- a/src/loaders/lottie/tvgLottieBuilder.cpp +++ b/src/loaders/lottie/tvgLottieBuilder.cpp @@ -472,11 +472,8 @@ void LottieBuilder::updateRect(LottieGroup* parent, LottieObject** child, float auto roundness = rect->radius(frameNo, exps); if (ctx->roundness > roundness) roundness = ctx->roundness; - if (roundness > ROUNDNESS_EPSILON) { - if (roundness > size.x * 0.5f) roundness = size.x * 0.5f; - if (roundness > size.y * 0.5f) roundness = size.y * 0.5f; - } - + if (roundness > ROUNDNESS_EPSILON) roundness = std::min(roundness, std::max(size.x, size.y) * 0.5f); + if (!ctx->repeaters.empty()) { auto shape = rect->pooling(); shape->reset();