mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Haiku: fix building
This commit is contained in:
@@ -327,12 +327,12 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons
|
||||
{
|
||||
// args = "/bin/bash -l"
|
||||
// argc = 2
|
||||
int argc = info.argc - 1; // 1
|
||||
const char* arg0End = strchr(p, ' '); // " -l"
|
||||
int argc = info.argc - 1;
|
||||
const char* arg0End = strchr(info.args, ' ');
|
||||
for (const char* p = arg0End + 1; (p = strchr(p, ' ')); ++p)
|
||||
--argc;
|
||||
if (argc == 1)
|
||||
ffStrbufSetNS(exe, info.args, arg0End - info.args /* /bin/bash */);
|
||||
if (argc == 1) // No whitespace in the file path
|
||||
ffStrbufSetNS(exe, (uint32_t) (arg0End - info.args), info.args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user