mirror of
https://github.com/reactos/reactos.git
synced 2024-07-13 16:15:05 +00:00
[NTVDM]
Fix a division-by-zero problem by storing the mouse driver's Width and Height in DWORDs, thus avoiding the integer overflow which could make them zero. svn path=/trunk/; revision=69408
This commit is contained in:
parent
646f9543f1
commit
8041081764
|
@ -211,8 +211,8 @@ static VOID EraseMouseCursor(VOID)
|
|||
static VOID ToMouseCoordinates(PCOORD Position)
|
||||
{
|
||||
COORD Resolution = VgaGetDisplayResolution();
|
||||
WORD Width = DriverState.MaxX - DriverState.MinX + 1;
|
||||
WORD Height = DriverState.MaxY - DriverState.MinY + 1;
|
||||
DWORD Width = DriverState.MaxX - DriverState.MinX + 1;
|
||||
DWORD Height = DriverState.MaxY - DriverState.MinY + 1;
|
||||
|
||||
if (!VgaGetDoubleVisionState(NULL, NULL))
|
||||
{
|
||||
|
@ -227,8 +227,8 @@ static VOID ToMouseCoordinates(PCOORD Position)
|
|||
static VOID FromMouseCoordinates(PCOORD Position)
|
||||
{
|
||||
COORD Resolution = VgaGetDisplayResolution();
|
||||
WORD Width = DriverState.MaxX - DriverState.MinX + 1;
|
||||
WORD Height = DriverState.MaxY - DriverState.MinY + 1;
|
||||
DWORD Width = DriverState.MaxX - DriverState.MinX + 1;
|
||||
DWORD Height = DriverState.MaxY - DriverState.MinY + 1;
|
||||
|
||||
if (!VgaGetDoubleVisionState(NULL, NULL))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue