summaryrefslogtreecommitdiff
path: root/apps/system
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-05-23 07:19:21 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-05-23 07:19:21 -0600
commitd5d3aa39f9476b2cbc2be0fffaf334b17a671720 (patch)
tree3b78aa726bbe78dd31d4390e9f27566028beb41b /apps/system
parent44f92c19879c4df8b16c6ad4f7f923efc01288c2 (diff)
downloadpx4-nuttx-d5d3aa39f9476b2cbc2be0fffaf334b17a671720.tar.gz
px4-nuttx-d5d3aa39f9476b2cbc2be0fffaf334b17a671720.tar.bz2
px4-nuttx-d5d3aa39f9476b2cbc2be0fffaf334b17a671720.zip
CLE: Was not returning the terminating newline character
Diffstat (limited to 'apps/system')
-rw-r--r--apps/system/cle/cle.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/system/cle/cle.c b/apps/system/cle/cle.c
index ca361c90c..2f1af2116 100644
--- a/apps/system/cle/cle.c
+++ b/apps/system/cle/cle.c
@@ -829,6 +829,9 @@ static int cle_editloop(FAR struct cle_s *priv)
#if defined(CONFIG_EOL_IS_CR)
case '\r': /* CR terminates line */
{
+ /* Add the newline character to the buffer */
+
+ cle_insertch(priv, '\n');
return OK;
}
break;
@@ -841,6 +844,9 @@ static int cle_editloop(FAR struct cle_s *priv)
#if defined(CONFIG_EOL_IS_LF) || defined(CONFIG_EOL_IS_BOTH_CRLF)
case '\n': /* LF terminates line */
{
+ /* Add the newline character to the buffer */
+
+ cle_insertch(priv, '\n');
return OK;
}
break;
@@ -850,6 +856,9 @@ static int cle_editloop(FAR struct cle_s *priv)
case '\r': /* Either CR or LF terminates line */
case '\n':
{
+ /* Add the newline character to the buffer */
+
+ cle_insertch(priv, '\n');
return OK;
}
break;