[PATCH] conhost: Copy font width/height to the new screen buffer to prevent an unhandled exception (divide by zero)
Hugh McMaster
hugh.mcmaster at outlook.com
Tue Jul 27 07:35:01 CDT 2021
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50187
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
programs/conhost/conhost.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
index 061f09989eb..fd1b6fb380e 100644
--- a/programs/conhost/conhost.c
+++ b/programs/conhost/conhost.c
@@ -90,12 +90,14 @@ static struct screen_buffer *create_screen_buffer( struct console *console, int
if (console->active)
{
- screen_buffer->max_width = console->active->max_width;
- screen_buffer->max_height = console->active->max_height;
- screen_buffer->win.right = console->active->win.right - console->active->win.left;
- screen_buffer->win.bottom = console->active->win.bottom - console->active->win.top;
- screen_buffer->attr = console->active->attr;
- screen_buffer->popup_attr = console->active->attr;
+ screen_buffer->max_width = console->active->max_width;
+ screen_buffer->max_height = console->active->max_height;
+ screen_buffer->win.right = console->active->win.right - console->active->win.left;
+ screen_buffer->win.bottom = console->active->win.bottom - console->active->win.top;
+ screen_buffer->font.width = console->active->font.width;
+ screen_buffer->font.height = console->active->font.height;
+ screen_buffer->attr = console->active->attr;
+ screen_buffer->popup_attr = console->active->attr;
}
else
{
--
2.32.0
More information about the wine-devel
mailing list