From 1d0cc17ae5a62b94e09997ba0b9ba563dc162d45 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 29 Dec 2023 14:50:38 +0300 Subject: [PATCH] fix --- src/fetch.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/fetch.c b/src/fetch.c index e2b4953..7e04149 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -215,8 +215,15 @@ int GetModel(const char *title, const FETCH fetch) { char model_buffer[MODEL_BUFF_SIZE + 1]; char *ptr = fgets(model_buffer, sizeof(model_buffer), fp); - if (ptr != NULL) + if (ptr != NULL) { + + /* del \n */ + char *ptr = strchr(model_buffer, '\n'); + if (ptr != NULL) + *ptr = '\0'; + printf("%s%s%s%s", fetch.color, title, fetch.font_color, model_buffer); + } fclose(fp); return 0;