Processing: always trim white spaces

This commit is contained in:
李通洲
2023-07-20 16:10:13 +08:00
parent e9ec7d3597
commit d13e72b815
2 changed files with 13 additions and 11 deletions
+1 -7
View File
@@ -41,17 +41,11 @@ static bool getFileVersion(const char* exePath, FFstrbuf* version)
static bool getExeVersionRaw(FFstrbuf* exe, FFstrbuf* version)
{
bool ok = ffProcessAppendStdOut(version, (char* const[]) {
return ffProcessAppendStdOut(version, (char* const[]) {
exe->chars,
"--version",
NULL
}) == NULL;
if (ok)
{
ffStrbufTrim(version, '\n');
ffStrbufTrim(version, ' ');
}
return ok;
}
static bool getExeVersionGeneral(FFstrbuf* exe, FFstrbuf* version)