mirror of
				https://github.com/xcat2/confluent.git
				synced 2025-10-31 03:12:31 +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:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user