From 905d7a9b2321ce62a8afd65b703875397524cae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Thu, 20 Jun 2024 05:52:29 +0900 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E3=81=91=E3=81=9F=E6=96=B9=E3=81=8C?= =?UTF-8?q?=E8=89=AF=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 92a3b9e..108ec5c 100644 --- a/main.c +++ b/main.c @@ -92,11 +92,10 @@ int main(int argc, char *argv[]) { const char *host = display_user_host(); if (name || host) { printf("%s ", LOGO[lc]); - printf( - "%s%s%s@%s%s%s\n", - titlecolor, name, reset, - titlecolor, host, reset - ); + if (name) printf("%s%s%s",titlecolor, name, reset); + if (name && host) printf("@"); + if (host) printf("%s%s%s", titlecolor, host, reset); + printf("\n"); if (name) free((void *)name); if (host) free((void *)host); lc++;