diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index df705e9ca..f1b59ba92 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -3103,7 +3103,8 @@ kwsys_stl::string SystemTools::GetOperatingSystemNameAndVersion() ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - if (!(bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *)&osvi))) + bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *)&osvi); + if (!bOsVersionInfoEx) { osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); if (!GetVersionEx((OSVERSIONINFO *)&osvi))