From 2281caaff87e05be6aa090adb09e1637248dd88c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 13 Aug 2024 15:28:07 +0800 Subject: [PATCH] Fastfetch: fix bug that stat info is unexpectly printed --- src/common/commandoption.c | 2 +- src/common/jsonconfig.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/commandoption.c b/src/common/commandoption.c index b71ef2bf4..01335a1ff 100644 --- a/src/common/commandoption.c +++ b/src/common/commandoption.c @@ -106,7 +106,7 @@ static void parseStructureCommand( void ffPrintCommandOption(FFdata* data, yyjson_mut_doc* jsonDoc) { //Parse the structure and call the modules - uint32_t thres = (uint32_t) instance.config.display.stat; + int32_t thres = instance.config.display.stat; uint32_t startIndex = 0; while (startIndex < data->structure.length) { diff --git a/src/common/jsonconfig.c b/src/common/jsonconfig.c index 673047b2d..5732e33b3 100644 --- a/src/common/jsonconfig.c +++ b/src/common/jsonconfig.c @@ -182,7 +182,7 @@ static const char* printJsonConfig(bool prepare, yyjson_mut_doc* jsonDoc) if (!modules) return NULL; if (!yyjson_is_arr(modules)) return "Property 'modules' must be an array of strings or objects"; - uint32_t thres = (uint32_t) instance.config.display.stat; + int32_t thres = instance.config.display.stat; yyjson_val* item; size_t idx, max; yyjson_arr_foreach(modules, idx, max, item)