Shell (Windows): fixes incompatibility with the newest fish version

This commit is contained in:
李通洲
2026-08-02 22:02:54 +08:00
parent 3fae9e0274
commit 66ce39e3fc
+7 -1
View File
@@ -90,7 +90,13 @@ static bool getShellVersionFish(FFstrbuf* exe, FFstrbuf* version) {
return false;
}
uint32_t index = ffStrbufFirstIndexC(version, ' '); // skip "fish,"
index = ffStrbufNextIndexC(version, index + 1, ' '); // skip "version"
while (!ffCharIsDigit(version->chars[index + 1])) {
index = ffStrbufNextIndexC(version, index + 1, ' '); // skip "version"
if (index == version->length) {
return false;
}
}
ffStrbufSubstrAfter(version, index);
ffStrbufSubstrBeforeFirstC(version, ' ');
return true;