mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
WM (Linux): fixes possible segfault when detecting sway version
Fixes #2360
This commit is contained in:
@@ -131,7 +131,7 @@ static const char* getSway(FFstrbuf* result) {
|
||||
|
||||
FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate();
|
||||
if (ffProcessAppendStdOut(&buffer, (char* const[]) { path.chars, "--version", NULL }) == NULL) { // sway version 1.10
|
||||
return extractSwayVersion(buffer.chars, result->length, result) ? "Failed to parse sway version output" : NULL;
|
||||
return extractSwayVersion(buffer.chars, buffer.length, result) ? "Failed to parse sway version output" : NULL;
|
||||
}
|
||||
|
||||
return "Failed to run command `sway --version`";
|
||||
|
||||
Reference in New Issue
Block a user