From b727eb7c04ea802f1c1f787282b56ad3af75380c Mon Sep 17 00:00:00 2001 From: TheDarkBug Date: Sun, 14 Mar 2021 15:19:49 +0100 Subject: [PATCH] Finally fixed #27. --- uwufetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uwufetch.c b/uwufetch.c index 7837aa9..a213382 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -170,7 +170,7 @@ void get_info() { // get all necessary info sprintf(version_name, "android"); // android vars FILE *whoami = popen("whoami", "r"); - fscanf(whoami, "%s", user); + if (fscanf(whoami, "%s", user) == 3) sprintf(user, "unknown"); fclose(whoami); while (fgets(line, sizeof(line), cpuinfo)) if (fscanf(cpuinfo, "Hardware : %[^\n]", cpu_model)) break; } else sprintf(version_name, "unknown");