mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Terminal (Windows): fix file version detection
This commit is contained in:
@@ -22,9 +22,11 @@
|
||||
|
||||
static bool getFileVersion(const FFstrbuf* exePath, const wchar_t* stringName, FFstrbuf* version)
|
||||
{
|
||||
wchar_t exePathW[PATH_MAX];
|
||||
wchar_t exePathW[PATH_MAX + 1];
|
||||
int len = MultiByteToWideChar(CP_UTF8, 0, exePath->chars, (int)exePath->length, exePathW, ARRAY_SIZE(exePathW));
|
||||
if (len <= 0) return false;
|
||||
assert(len < (int) ARRAY_SIZE(exePathW));
|
||||
exePathW[len] = L'\0';
|
||||
return ffGetFileVersion(exePathW, stringName, version);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user