From ea0cce7b6390cab3ba7c16560f50e69322eb89fb Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 20 Nov 2015 11:42:15 +0000 Subject: [PATCH] Make room for null-terminator --- noice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noice.c b/noice.c index 17a0cea4..c72417f9 100644 --- a/noice.c +++ b/noice.c @@ -331,7 +331,7 @@ readln(void) echo(); curs_set(TRUE); - getnstr(ln, sizeof(ln)); + getnstr(ln, sizeof(ln) - 1); noecho(); curs_set(FALSE); return strdup(ln);