diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-08-13 12:15:45 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-08-13 12:15:45 +0000 |
commit | 7a005b91b373aad3cfa877081b1df9c8d52f1d58 (patch) | |
tree | c8eaab07c497ee198ed48400e552618132d410dd /server-msg.c | |
parent | bc497dbb92268004e33c4f1deb09d3cbbeaa48a0 (diff) | |
download | rtmux-7a005b91b373aad3cfa877081b1df9c8d52f1d58.tar.gz rtmux-7a005b91b373aad3cfa877081b1df9c8d52f1d58.tar.bz2 rtmux-7a005b91b373aad3cfa877081b1df9c8d52f1d58.zip |
If the client passes zero for the window size in the identify message (which it
can, for example on serial terminals), reset it to 80x25, same as for resize
messages. Problem reported by kettenis@.
Diffstat (limited to 'server-msg.c')
-rw-r--r-- | server-msg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server-msg.c b/server-msg.c index 286e8bdc..e8aea526 100644 --- a/server-msg.c +++ b/server-msg.c @@ -238,7 +238,11 @@ void server_msg_identify(struct client *c, struct msg_identify_data *data, int fd) { c->tty.sx = data->sx; + if (c->tty.sx == 0) + c->tty.sx = 80; c->tty.sy = data->sy; + if (c->tty.sy == 0) + c->tty.sy = 25; c->cwd = NULL; data->cwd[(sizeof data->cwd) - 1] = '\0'; |