summaryrefslogtreecommitdiff
path: root/lib/system_win32.c
diff options
context:
space:
mode:
authordjelinski <30433125+djelinski@users.noreply.github.com>2018-07-25 14:01:55 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-07-25 22:15:01 +0200
commitd0d48b42763ec8649196fbf7648ad9de0127dc27 (patch)
treecb59e9859efab3f4ca08c9606ec8a4ace96f711a /lib/system_win32.c
parent6f5ef24f068a86d0f61ce39f674462128c1743d1 (diff)
downloadcurl-d0d48b42763ec8649196fbf7648ad9de0127dc27.tar.gz
system_win32: fix version checking
In the current version, VERSION_GREATER_THAN_EQUAL 6.3 will return false when run on windows 10.0. This patch addresses that error. Closes https://github.com/curl/curl/pull/2792
Diffstat (limited to 'lib/system_win32.c')
-rw-r--r--lib/system_win32.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/system_win32.c b/lib/system_win32.c
index cfbbf3279..89d648516 100644
--- a/lib/system_win32.c
+++ b/lib/system_win32.c
@@ -134,8 +134,9 @@ bool Curl_verify_windows_version(const unsigned int majorVersion,
break;
case VERSION_LESS_THAN_EQUAL:
- if(osver.dwMajorVersion <= majorVersion &&
- osver.dwMinorVersion <= minorVersion)
+ if(osver.dwMajorVersion < majorVersion ||
+ (osver.dwMajorVersion == majorVersion &&
+ osver.dwMinorVersion <= minorVersion))
matched = TRUE;
break;
@@ -146,8 +147,9 @@ bool Curl_verify_windows_version(const unsigned int majorVersion,
break;
case VERSION_GREATER_THAN_EQUAL:
- if(osver.dwMajorVersion >= majorVersion &&
- osver.dwMinorVersion >= minorVersion)
+ if(osver.dwMajorVersion > majorVersion ||
+ (osver.dwMajorVersion == majorVersion &&
+ osver.dwMinorVersion >= minorVersion))
matched = TRUE;
break;