mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Fix zero-rows-cols-crash
[originally from svn r6515]
This commit is contained in:
parent
6a596c736a
commit
ad05f78303
@ -1535,6 +1535,11 @@ void term_size(Terminal *term, int newrows, int newcols, int newsavelines)
|
||||
newsavelines == term->savelines)
|
||||
return; /* nothing to do */
|
||||
|
||||
/* Behave sensibly if we're given zero (or negative) rows/cols */
|
||||
|
||||
if (newrows < 1) newrows = 1;
|
||||
if (newcols < 1) newcols = 1;
|
||||
|
||||
deselect(term);
|
||||
swap_screen(term, 0, FALSE, FALSE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user