From db0b7acd13c5f12fa9a274905795fb578a4a0e50 Mon Sep 17 00:00:00 2001 From: Brendan Hay Date: Fri, 4 Oct 2019 22:56:30 +0200 Subject: [PATCH] Adding terminal guard around tty column/row calculations --- pkg/urbit/vere/term.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/urbit/vere/term.c b/pkg/urbit/vere/term.c index 60f3a0981..2d34b80a6 100644 --- a/pkg/urbit/vere/term.c +++ b/pkg/urbit/vere/term.c @@ -919,10 +919,13 @@ u3_term_get_blew(c3_l tid_l) c3_l col_l, row_l; struct winsize siz_u; - if ( uty_u && (0 == ioctl(uty_u->fid_i, TIOCGWINSZ, &siz_u)) ) { + if ( (c3y == u3_Host.ops_u.tem) && + uty_u && (0 == ioctl(uty_u->fid_i, TIOCGWINSZ, &siz_u)) ) + { col_l = siz_u.ws_col; row_l = siz_u.ws_row; - } else { + } + else { col_l = 80; row_l = 24; }