mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 02:52:07 +00:00
Put a lower bound on autocons geometry
If some glitch happens during the read, do not end up with absurdly low geometry.
This commit is contained in:
parent
79ef1c4811
commit
697b33ae80
@ -120,6 +120,8 @@ int main(int argc, char* argv[]) {
|
||||
ws.ws_col = 100;
|
||||
ws.ws_row = 31;
|
||||
}
|
||||
if (ws.ws_col < 80) { ws.ws_col = 80; }
|
||||
if (ws.ws_row < 24) { ws.ws_col = 24; }
|
||||
ioctl(ttyf, TIOCSWINSZ, &ws);
|
||||
tcsetattr(ttyf, TCSANOW, &tty);
|
||||
ioctl(ttyf, TIOCCONS, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user