Adding terminal guard around tty column/row calculations

This commit is contained in:
Brendan Hay 2019-10-04 22:56:30 +02:00
parent e8f133d532
commit db0b7acd13
No known key found for this signature in database
GPG Key ID: 80E915C54A7C457D

View File

@ -919,10 +919,13 @@ u3_term_get_blew(c3_l tid_l)
c3_l col_l, row_l; c3_l col_l, row_l;
struct winsize siz_u; 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; col_l = siz_u.ws_col;
row_l = siz_u.ws_row; row_l = siz_u.ws_row;
} else { }
else {
col_l = 80; col_l = 80;
row_l = 24; row_l = 24;
} }