Commit 9ce8aafd authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

kernel32/tests: Fix rounding error when calculating console font size.

parent bd9db4b6
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment