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@.
pull/1/head
Nicholas Marriott 2009-08-13 12:15:45 +00:00
parent bc497dbb92
commit 7a005b91b3
1 changed files with 4 additions and 0 deletions

View File

@ -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';