This commit is contained in:
Your Name 2023-12-29 14:50:38 +03:00
parent 22c4e8cdb0
commit 1d0cc17ae5
1 changed files with 8 additions and 1 deletions

View File

@ -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;