From: Pasi Kallinen Date: Fri, 7 Dec 2018 20:18:50 +0000 (+0200) Subject: Clear the getlin buffer X-Git-Tag: nmake-explicit-path~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8319227b557c98db99776f2a3ea1fe3022643497;p=nethack Clear the getlin buffer Recent change to this bit of code didn't clear the buffer, which causes garbage in the string if compiled with EDIT_GETLIN --- diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 47bac195b..b5c4451df 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -2046,7 +2046,7 @@ struct WinDesc *cw; tty_nhbell(); break; } else { - char searchbuf[BUFSZ + 2], tmpbuf[BUFSZ]; + char searchbuf[BUFSZ + 2], tmpbuf[BUFSZ] = DUMMY; boolean on_curr_page = FALSE; int lineno = 0;