Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com --- dlls/kernel32/tests/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index 6ee00aa49a6..bd5cad428bc 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -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);