From 50cc6b66f92fcc643561fd338aafe84a7e04b056 Mon Sep 17 00:00:00 2001 From: TheDarkBug Date: Sat, 2 Oct 2021 21:10:49 +0200 Subject: [PATCH] Fixed #133 --- uwufetch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uwufetch.c b/uwufetch.c index 1b2ba93..0523e96 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -184,7 +184,8 @@ int main(int argc, char *argv[]) void parse_config() { char line[256]; - char *homedir = getenv("HOME"); + char homedir[64]; + sprintf(homedir, "%s", getenv("HOME")); // opening and reading the config file FILE *config; @@ -524,7 +525,7 @@ void get_info() fclose(cpuinfo); #endif gethostname(host, 256); - sscanf(getenv("SHELL"), "%s", shell); + sprintf(shell, "%s", getenv("SHELL")); if (strlen(shell) > 16) memmove(&shell, &shell[27], strlen(shell)); // android shell was too long, this works only for termux