mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Shell: remove trailing \0 in JSON output
This commit is contained in:
@@ -86,7 +86,7 @@ static void getProcessInformation(pid_t pid, FFstrbuf* processName, FFstrbuf* ex
|
||||
args, &size,
|
||||
NULL, 0
|
||||
) == 0)
|
||||
ffStrbufSetS(exePath, args);
|
||||
ffStrbufSetNS(exePath, (uint32_t) (size - 1), args);
|
||||
|
||||
size = ARG_MAX;
|
||||
if(sysctl(
|
||||
|
||||
@@ -33,7 +33,7 @@ static void getExePath(FFPlatform* platform)
|
||||
exePathLen = 0;
|
||||
#endif
|
||||
if (exePathLen > 0)
|
||||
exePath->length = (uint32_t) exePathLen;
|
||||
exePath->length = (uint32_t) (exePathLen - 1);
|
||||
}
|
||||
|
||||
static void platformPathAddEnv(FFlist* dirs, const char* env)
|
||||
|
||||
Reference in New Issue
Block a user