diff options
author | Glenn L McGrath | 2003-10-01 10:26:23 +0000 |
---|---|---|
committer | Glenn L McGrath | 2003-10-01 10:26:23 +0000 |
commit | 0ad4daa54ea646ef60eab56b664d97386cd95a85 (patch) | |
tree | a369b9d5bda25e91385fd3efe8343531160f414e /editors | |
parent | 738fb33994dd60ccbb33b328bd6028836a463490 (diff) | |
download | busybox-0ad4daa54ea646ef60eab56b664d97386cd95a85.zip busybox-0ad4daa54ea646ef60eab56b664d97386cd95a85.tar.gz |
Patch from Rob Landley to fix backrefs
Diffstat (limited to 'editors')
-rw-r--r-- | editors/sed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c index 3d6d72c..da06bf4 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -570,7 +570,7 @@ static void do_subst_w_backrefs(const char *line, const char *replace) /* go through the replacement string */ for (i = 0; replace[i]; i++) { /* if we find a backreference (\1, \2, etc.) print the backref'ed * text */ - if (replace[i] == '\\' && replace[i+1]>0 && replace[i+1]<=9) { + if (replace[i] == '\\' && replace[i+1]>'0' && replace[i+1]<='9') { int backref=replace[++i]-'0'; /* print out the text held in regmatch[backref] */ |