Initialize default size variables, from Thomas Adam.

pull/1743/head
nicm 2019-05-17 05:47:31 +00:00
parent cf4566b47b
commit 4acd345c6a
1 changed files with 4 additions and 0 deletions

View File

@ -192,6 +192,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
if (strcmp(tmp, "-") == 0) {
if (c != NULL)
dsx = c->tty.sx;
else
dsx = 80;
} else {
dsx = strtonum(tmp, 1, USHRT_MAX, &errstr);
if (errstr != NULL) {
@ -205,6 +207,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
if (strcmp(tmp, "-") == 0) {
if (c != NULL)
dsy = c->tty.sy;
else
dsy = 24;
} else {
dsy = strtonum(tmp, 1, USHRT_MAX, &errstr);
if (errstr != NULL) {