krnl386.exe: Cap GetFreeSpace value to 2GB.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46962
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit eca2bfd071)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
Akihiro Sagawa 2021-02-20 21:26:27 +09:00 committed by Michael Stefaniuc
parent dc85e95017
commit 0dc595d4e1
1 changed files with 1 additions and 1 deletions

View File

@ -750,7 +750,7 @@ DWORD WINAPI GetFreeSpace16( UINT16 wFlags )
{
MEMORYSTATUS ms;
GlobalMemoryStatus( &ms );
return ms.dwAvailVirtual;
return min( ms.dwAvailVirtual, MAXLONG );
}
/***********************************************************************