InitSystem (Linux): fix dinit version parsing

Ref: https://github.com/fastfetch-cli/fastfetch/issues/1245#issuecomment-2326516448
This commit is contained in:
李通洲
2024-09-03 21:36:03 +08:00
parent aec27c3e50
commit 90b2bf0ad6
@@ -79,6 +79,7 @@ const char* ffDetectInitSystem(FFInitSystemResult* result)
}) == NULL && result->version.length)
{
// Dinit version 0.18.0.
ffStrbufSubstrBeforeFirstC(&result->version, '\n');
ffStrbufTrimRight(&result->version, '.');
ffStrbufSubstrAfterLastC(&result->version, ' ');
}