diff --git a/src/base/system.c b/src/base/system.c index cb89cbbc4..58d39035c 100644 --- a/src/base/system.c +++ b/src/base/system.c @@ -2371,16 +2371,12 @@ int os_compare_version(int major, int minor) mem_zero(&ver, sizeof(OSVERSIONINFO)); ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&ver); - if(ver.dwMajorVersion > major && ver.dwMinorVersion > minor) + if(ver.dwMajorVersion > major || (ver.dwMajorVersion == major && ver.dwMinorVersion > minor)) return 1; else if(ver.dwMajorVersion == major && ver.dwMinorVersion == minor) return 0; - else if(ver.dwMajorVersion < major && ver.dwMinorVersion < minor) + else return -1; - else - return -2; -#else - #error not implemented #endif } diff --git a/src/engine/client/autoupdate.cpp b/src/engine/client/autoupdate.cpp index 3cea537ea..aa701639b 100644 --- a/src/engine/client/autoupdate.cpp +++ b/src/engine/client/autoupdate.cpp @@ -25,7 +25,7 @@ void CAutoUpdate::Init() m_pClient = Kernel()->RequestInterface(); m_pStorage = Kernel()->RequestInterface(); m_pFetcher = Kernel()->RequestInterface(); - m_IsWinXP = (os_compare_version(5, 0) == 1 && os_compare_version(6, 0) == -1); + m_IsWinXP = os_compare_version(5, 1) <= 0; } void CAutoUpdate::ProgressCallback(CFetchTask *pTask, void *pUser)