From: Olivier Matz Date: Sun, 31 Jul 2011 19:51:59 +0000 (+0200) Subject: rdline: don't include '\n' in rdline buffer when user validates X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d90a1a5e9a41e94a2acd1f5189d6ad62fc91163b;p=libcmdline.git rdline: don't include '\n' in rdline buffer when user validates Signed-off-by: Olivier Matz --- diff --git a/src/lib/cmdline_rdline.c b/src/lib/cmdline_rdline.c index 4c746fa..5632a87 100644 --- a/src/lib/cmdline_rdline.c +++ b/src/lib/cmdline_rdline.c @@ -474,8 +474,7 @@ rdline_parse_char(struct rdline *rdl, char c) cirbuf_add_tail(&rdl->left, tmp); } cirbuf_align_left(&rdl->left); - rdl->left_buf[CIRBUF_GET_LEN(&rdl->left)] = '\n'; - rdl->left_buf[CIRBUF_GET_LEN(&rdl->left) + 1] = '\0'; + rdl->left_buf[CIRBUF_GET_LEN(&rdl->left)] = '\0'; rdline_printf(rdl, "\r\n"); #ifndef NO_RDLINE_HISTORY if (rdl->history_cur_line != -1)