]> granicus.if.org Git - nethack/commitdiff
Clear the getlin buffer
authorPasi Kallinen <paxed@alt.org>
Fri, 7 Dec 2018 20:18:50 +0000 (22:18 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 7 Dec 2018 20:18:53 +0000 (22:18 +0200)
Recent change to this bit of code didn't clear the buffer,
which causes garbage in the string if compiled with EDIT_GETLIN

win/tty/wintty.c

index 47bac195b7804c2ca82da52cb1b12aae7468ddd7..b5c4451df8bb3790599a3b77e426b705fc41dfc0 100644 (file)
@@ -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;