From f290806baa90065bc825b0f9d9f245e8acb0b470 Mon Sep 17 00:00:00 2001 From: dqnk <64268180+dqnk@users.noreply.github.com> Date: Tue, 16 Mar 2021 08:19:57 +0100 Subject: [PATCH] Cpu name fix (#39) --- Makefile | 2 +- uwufetch.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5ab7da2..d146bef 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ build: uwufetch.c debug: clear gcc $(FLAGS_DEBUG) -o $(NAME) $(FILES) - ./uwufetch -d raspbian + ./uwufetch install: cp $(NAME) $(INSTALL_DIR)$(NAME) diff --git a/uwufetch.c b/uwufetch.c index b1ba57b..5361803 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -160,7 +160,7 @@ void get_info() { // get all necessary info sscanf(line, "\nID=%s", version_name); if (strlen(version_name)) break; } - while (fgets(line, sizeof(line), cpuinfo)) if (fscanf(cpuinfo, "model name : %[^with\n]", cpu_model)) break; + while (fgets(line, sizeof(line), cpuinfo)) if (sscanf(line, "model name : %[^\n]", cpu_model)) break; sprintf(user, "%s", getenv("USER")); fclose(os_release); } else { // try for android vars, or unknown system @@ -397,7 +397,7 @@ void usage(char* arg) { " -h, --help prints this help page\n" " -i, --image prints logo as image\n" " %sworks in most terminals\n" - " read res/IMAGES.md for more info%s\n", + " read res/IMAGES.md for more info%s\n" " -l lists all supported distributions\n", arg, BLUE, NORMAL); }