summaryrefslogtreecommitdiffstats
path: root/mbbsd/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/io.c')
-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]));