projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
738fb33
)
Patch from Rob Landley to fix backrefs
author
Glenn L McGrath
<bug1@ihug.co.nz>
Wed, 1 Oct 2003 10:26:23 +0000
(10:26 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Wed, 1 Oct 2003 10:26:23 +0000
(10:26 -0000)
editors/sed.c
patch
|
blob
|
history
diff --git
a/editors/sed.c
b/editors/sed.c
index 3d6d72c6873b783d35713b3947fac7541baefe40..da06bf485f18f378e99d29b86d9ce41869e9180a 100644
(file)
--- 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] */