kernel32/tests: Fix rounding error when calculating console font size.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bd9db4b6de
commit
9ce8aafdae
|
@ -3579,8 +3579,8 @@ static void test_GetConsoleFontSize(HANDLE std_output)
|
|||
ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
|
||||
GetClientRect(GetConsoleWindow(), &r);
|
||||
GetConsoleScreenBufferInfo(std_output, &csbi);
|
||||
font_width = (r.right - r.left + 1) / csbi.srWindow.Right;
|
||||
font_height = (r.bottom - r.top + 1) / csbi.srWindow.Bottom;
|
||||
font_width = (r.right - r.left) / (csbi.srWindow.Right - csbi.srWindow.Left + 1);
|
||||
font_height = (r.bottom - r.top) / (csbi.srWindow.Bottom - csbi.srWindow.Top + 1);
|
||||
ok(c.X == font_width, "got %d, expected %d\n", c.X, font_width);
|
||||
ok(c.Y == font_height, "got %d, expected %d\n", c.Y, font_height);
|
||||
|
||||
|
|
Loading…
Reference in New Issue