projects
/
u
/
mdw
/
putty
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fb0e72
)
Fix zero-rows-cols-crash
author
owen
<owen@cda61777-01e9-0310-a592-d414129be87e>
Tue, 10 Jan 2006 20:02:22 +0000
(20:02 +0000)
committer
owen
<owen@cda61777-01e9-0310-a592-d414129be87e>
Tue, 10 Jan 2006 20:02:22 +0000
(20:02 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@6515
cda61777
-01e9-0310-a592-
d414129be87e
terminal.c
patch
|
blob
|
blame
|
history
diff --git
a/terminal.c
b/terminal.c
index
2f7527c
..
311df18
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-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);