Index: src/plugin/PluginSettings.cpp |
=================================================================== |
--- a/src/plugin/PluginSettings.cpp |
+++ b/src/plugin/PluginSettings.cpp |
@@ -231,17 +231,12 @@ |
{ |
if (m_WindowsBuildNumber == 0) |
{ |
- OSVERSIONINFOEX osvi; |
- SYSTEM_INFO si; |
- BOOL bOsVersionInfoEx; |
- |
- ZeroMemory(&si, sizeof(SYSTEM_INFO)); |
- ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); |
- |
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); |
- bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO*) &osvi); |
- |
- m_WindowsBuildNumber = osvi.dwBuildNumber; |
+ OSVERSIONINFOEX osvi = {}; |
+ osvi.dwOSVersionInfoSize = sizeof(osvi); |
+ if (GetVersionExW(reinterpret_cast<OSVERSIONINFO*>(&osvi)) != 0) |
+ { |
+ m_WindowsBuildNumber = osvi.dwBuildNumber; |
+ } |
} |
return m_WindowsBuildNumber; |