Initialize dwOSVersionInfoSize in GlobalMemoryStatus.

This commit is contained in:
Paul Vriens 2004-12-27 17:06:18 +00:00 committed by Alexandre Julliard
parent 41314e6992
commit 78f90d9026
1 changed files with 4 additions and 2 deletions

View File

@ -1179,7 +1179,7 @@ BOOL WINAPI GlobalMemoryStatusEx( LPMEMORYSTATUSEX lpmemex )
VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
{
MEMORYSTATUSEX memstatus;
OSVERSIONINFOA osver;
OSVERSIONINFOW osver;
/* Because GlobalMemoryStatus is identical to GlobalMemoryStatusEX save
for one extra field in the struct, and the lack of a bug, we simply
@ -1193,7 +1193,9 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
* NT reports values modulo 4 Gb.
* Values between 2 Gb and 4 Gb are rounded down to 2 Gb.
*/
GetVersionExA(&osver);
osver.dwOSVersionInfoSize = sizeof(osver);
GetVersionExW(&osver);
if ( osver.dwMajorVersion >= 5 )
{