summaryrefslogtreecommitdiffstats
path: root/src/history.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/history.c')
-rw-r--r--src/history.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/history.c b/src/history.c
index 5bb6288..75ce8ff 100644
--- a/src/history.c
+++ b/src/history.c
@@ -234,7 +234,7 @@ inputln_replace(struct inputln *line, const char *str)
line->len = strlen(str);
if (line->cap <= line->len)
inputln_resize(line, line->len + 1);
- strncpy(line->buf, str, line->len);
+ strncpy(line->buf, str, line->len + 1);
line->cur = line->len;
}