From e486a91f132c429c225543a120de1044199f5e3e Mon Sep 17 00:00:00 2001 From: piaip Date: Sat, 12 Jan 2008 08:11:57 +0000 Subject: - io/getdata: close buffer git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3825 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mbbsd/io.c b/mbbsd/io.c index cd2388ec..71b153c1 100644 --- a/mbbsd/io.c +++ b/mbbsd/io.c @@ -967,6 +967,7 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo) } /* end case */ assert(0<=clen); } /* end while */ + buf[clen] = '\0'; if (clen > 1) { strlcpy(lastcmd[0], buf, sizeof(lastcmd[0])); -- cgit v1.2.3