aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2002-01-02 17:56:38 +0000
committerMatt Kraai <kraai@debian.org>2002-01-02 17:56:38 +0000
commitd21735de2d7380d96cd42458c6d9775143abe6ea (patch)
tree45be2ee19d2f5811a889eecd771fd0f76042e508 /editors
parent87ac7028e01cdc4f504ea558a6ae3d086ed1bf2b (diff)
downloadbusybox-d21735de2d7380d96cd42458c6d9775143abe6ea.tar.gz
* editors/sed.c (parse_edit_command): Require a newline after the backslash
after an edit command. * testsuite/sed/sed-requires-newline-after-edit-command: New.
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c
index fe1c0dbae..1c026d30b 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -322,7 +322,7 @@ static int parse_edit_cmd(struct sed_cmd *sed_cmd, const char *editstr)
*
*/
- if (editstr[1] != '\\' && (editstr[2] != '\n' || editstr[2] != '\r'))
+ if (editstr[1] != '\\' || (editstr[2] != '\n' && editstr[2] != '\r'))
error_msg_and_die("bad format in edit expression");
/* store the edit line text */