From 24a9231ad0bc1de76161a67f4ec199e04c324b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 15 Sep 2023 20:58:57 +0800 Subject: [PATCH] Kernel (Windows): remove trailing `\0` --- src/util/platform/FFPlatform_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/platform/FFPlatform_windows.c b/src/util/platform/FFPlatform_windows.c index 0009dd10e..02389e63b 100644 --- a/src/util/platform/FFPlatform_windows.c +++ b/src/util/platform/FFPlatform_windows.c @@ -184,7 +184,7 @@ static void getSystemReleaseAndVersion(FFPlatform* platform) ffStrbufEnsureFree(&platform->systemVersion, 256); bufSize = (DWORD) ffStrbufGetFree(&platform->systemVersion); if(RegGetValueA(hKey, NULL, "DisplayVersion", RRF_RT_REG_SZ, NULL, platform->systemVersion.chars, &bufSize) == ERROR_SUCCESS) - platform->systemVersion.length = (uint32_t) bufSize; + platform->systemVersion.length = (uint32_t) bufSize - 1; RegCloseKey(hKey); }