aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shell.c.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shell.c.in b/src/shell.c.in
index b29e40291..ccaed896d 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -1776,6 +1776,7 @@ static void editFunc(
}else{
/* If the file did not originally contain \r\n then convert any new
** \r\n back into \n */
+ p[sz] = 0;
for(i=j=0; i<sz; i++){
if( p[i]=='\r' && p[i+1]=='\n' ) i++;
p[j++] = p[i];