aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/sed.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c
index adf79d4d6..2c2148e5f 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -457,6 +457,7 @@ void add_cmd(char *cmdstr)
457{ 457{
458 static char *add_cmd_line=NULL; 458 static char *add_cmd_line=NULL;
459 sed_cmd_t *sed_cmd; 459 sed_cmd_t *sed_cmd;
460 int temp;
460 461
461 /* Append this line to any unfinished line from last time. */ 462 /* Append this line to any unfinished line from last time. */
462 if(add_cmd_line) { 463 if(add_cmd_line) {
@@ -471,7 +472,7 @@ void add_cmd(char *cmdstr)
471 } else add_cmd_line=NULL; 472 } else add_cmd_line=NULL;
472 473
473 /* If this line ends with backslash, request next line. */ 474 /* If this line ends with backslash, request next line. */
474 int temp=strlen(cmdstr); 475 temp=strlen(cmdstr);
475 if(temp && cmdstr[temp-1]=='\\') { 476 if(temp && cmdstr[temp-1]=='\\') {
476 if(!add_cmd_line) add_cmd_line=strdup(cmdstr); 477 if(!add_cmd_line) add_cmd_line=strdup(cmdstr);
477 add_cmd_line[temp-1]=0; 478 add_cmd_line[temp-1]=0;