[vte] Don't allow setting negative row/column size
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Don't allow setting negative row/column size
- Date: Tue, 30 Mar 2010 19:50:54 +0000 (UTC)
commit 9ce477c70120a2a24c32bcacebc28b6e09a63957
Author: Christian Persch <chpe gnome org>
Date: Tue Mar 30 20:55:47 2010 +0200
Don't allow setting negative row/column size
src/pty.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/pty.c b/src/pty.c
index 1630b27..05957cc 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -642,8 +642,8 @@ vte_pty_set_size(VtePty *pty,
master = vte_pty_get_fd(pty);
memset(&size, 0, sizeof(size));
- size.ws_row = rows ? rows : 24;
- size.ws_col = columns ? columns : 80;
+ size.ws_row = rows > 0 ? rows : 24;
+ size.ws_col = columns > 0 ? columns : 80;
_vte_debug_print(VTE_DEBUG_PTY,
"Setting size on fd %d to (%d,%d).\n",
master, columns, rows);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]