fix
This commit is contained in:
parent
22c4e8cdb0
commit
1d0cc17ae5
@ -215,8 +215,15 @@ int GetModel(const char *title, const FETCH fetch) {
|
|||||||
|
|
||||||
char model_buffer[MODEL_BUFF_SIZE + 1];
|
char model_buffer[MODEL_BUFF_SIZE + 1];
|
||||||
char *ptr = fgets(model_buffer, sizeof(model_buffer), fp);
|
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);
|
printf("%s%s%s%s", fetch.color, title, fetch.font_color, model_buffer);
|
||||||
|
}
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user