summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-12 16:11:57 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-12 16:11:57 +0800
commite486a91f132c429c225543a120de1044199f5e3e (patch)
tree5a52062638cd1e5bb3fd195cbb538f9ee2654e34
parenta04d26d1a2d53f10bbe62525023aee3b9bbfea8e (diff)
downloadpttbbs-e486a91f132c429c225543a120de1044199f5e3e.tar
pttbbs-e486a91f132c429c225543a120de1044199f5e3e.tar.gz
pttbbs-e486a91f132c429c225543a120de1044199f5e3e.tar.bz2
pttbbs-e486a91f132c429c225543a120de1044199f5e3e.tar.lz
pttbbs-e486a91f132c429c225543a120de1044199f5e3e.tar.xz
pttbbs-e486a91f132c429c225543a120de1044199f5e3e.tar.zst
pttbbs-e486a91f132c429c225543a120de1044199f5e3e.zip
- io/getdata: close buffer
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3825 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/io.c1
1 files changed, 1 insertions, 0 deletions
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]));