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); }