From 4dbd950d703dac6267bc795ae042dfca8e86d220 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Fri, 23 Sep 2011 21:44:55 +0000 Subject: [PATCH] fs_cli: be a bit more defensive --- libs/esl/fs_cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/esl/fs_cli.c b/libs/esl/fs_cli.c index 5395504d0c..98724c3696 100644 --- a/libs/esl/fs_cli.c +++ b/libs/esl/fs_cli.c @@ -587,7 +587,7 @@ static void redisplay(void) const LineInfo *lf = el_line(el); const char *c = lf->buffer; printf("%s",prompt_str); - while (*c && c != lf->lastchar) { + while (c <= lf->lastchar && *c) { putchar(*c); c++; }