mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 09:58:03 +02:00
Shell (Linux): fixes a potiential fish version detection error
This commit is contained in:
@@ -89,7 +89,8 @@ static bool getShellVersionFish(FFstrbuf* exe, FFstrbuf* version) {
|
||||
if (version->length < strlen("fish, v") || !ffStrbufStartsWithS(version, "fish")) {
|
||||
return false;
|
||||
}
|
||||
uint32_t index = ffStrbufNextIndexC(version, strlen("fish, "), ' ');
|
||||
uint32_t index = ffStrbufFirstIndexC(version, ' '); // skip "fish,"
|
||||
index = ffStrbufNextIndexC(version, index + 1, ' '); // skip "version"
|
||||
ffStrbufSubstrAfter(version, index);
|
||||
ffStrbufSubstrBeforeFirstC(version, ' ');
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user