about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/lcurses/window.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lcurses/window.c b/src/lcurses/window.c
index 2f80390..2ce418d 100644
--- a/src/lcurses/window.c
+++ b/src/lcurses/window.c
@@ -1302,6 +1302,7 @@ Wgetch(lua_State *L)
 	render_trusted_teliva_data(L);  /* Apps can draw what they want on screen,
 	                                 * but Teliva's UI is always visible when
 	                                 * asking the user to make a decision. */
+	if (x > COLS-2) x = COLS-2; if (y > LINES-1) y = LINES-1; /* http://gnats.netbsd.org/56664 */
 	mvaddstr(y, x, "");
 	int c = wgetch(w);