From fd4ed07449c5d2cddd5c0325001392c1547e8071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 28 Jun 2023 10:04:10 +0800 Subject: [PATCH] Logo: simplify ffLogoPrintRemaining --- src/logo/logo.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/logo/logo.c b/src/logo/logo.c index f07155936..c1e2b9f28 100644 --- a/src/logo/logo.c +++ b/src/logo/logo.c @@ -467,11 +467,9 @@ void ffLogoPrintLine(void) void ffLogoPrintRemaining(void) { - while(instance.state.keysHeight <= instance.state.logoHeight) - { - ffLogoPrintLine(); - putchar('\n'); - } + if (instance.state.keysHeight <= instance.state.logoHeight) + ffPrintCharTimes('\n', instance.state.logoHeight - instance.state.keysHeight + 1); + instance.state.keysHeight = instance.state.logoHeight + 1; } void ffLogoBuiltinPrint(void)