aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/lineedit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index b168f1b86..85643079b 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1255,7 +1255,9 @@ line_input_t* FAST_FUNC new_line_input_t(int flags)
{
line_input_t *n = xzalloc(sizeof(*n));
n->flags = flags;
+#if MAX_HISTORY > 0
n->max_history = MAX_HISTORY;
+#endif
return n;
}