4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-18 12:29:32 +08:00

cygwin: wincap: fix evaluation of build number

RtlGetNtVersionNumbers returns the build number with some upper bits
set for no apparent reason.  The fact that RtlGetNtVersionNumbers is
undocumented doesn't exactly help.

Just filter out the upper WORD for now.  If build numbers are in
danger to become 6 digit numbers, re-evaluate.
This commit is contained in:
Corinna Vinschen 2017-04-24 17:12:16 +02:00
parent 3885c06c4f
commit 63f19278b9

View File

@ -118,6 +118,7 @@ wincapc::init ()
RtlGetNtVersionNumbers (&version.dwMajorVersion,
&version.dwMinorVersion,
&version.dwBuildNumber);
version.dwBuildNumber &= 0xffff;
switch (version.dwMajorVersion)
{