From 824ba3f42f7b6c0fea856186ea280bb4537b6027 Mon Sep 17 00:00:00 2001 From: TheDarkBug Date: Mon, 6 Dec 2021 11:52:08 +0100 Subject: [PATCH] Second fix try for #171 --- uwufetch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uwufetch.c b/uwufetch.c index 14c3656..334f09e 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -730,7 +730,7 @@ struct info get_info() #endif host_model_info = popen("sysctl -a " HOSTCTL, "r"); while (fgets(line, sizeof(line), host_model_info)) - if (sscanf(line, HOSTCTL ": %[^\n]", user_info->host_model)) break; + if (sscanf(line, HOSTCTL ": %[^\n]", user_info.host_model)) break; #endif // _WIN32 FILE* host_model_version = fopen("/sys/devices/virtual/dmi/id/product_version", "r"); @@ -975,8 +975,8 @@ struct info get_info() // Total sysctlbyname("hw.memsize", &mem_buffer, &mem_buffer_len, NULL, 0); - user_info->ram_used = ((mem_wired + mem_active + mem_compressed) * 4 / 1024); - user_info->ram_total = mem_buffer / 1024 / 1024; + user_info.ram_used = ((mem_wired + mem_active + mem_compressed) * 4 / 1024); + user_info.ram_total = mem_buffer / 1024 / 1024; #endif /* ---------- gpu ---------- */