mirror of
https://git.busybox.net/busybox
synced 2026-02-15 22:16:09 +00:00
Patch from Rob Landley to fix backrefs
This commit is contained in:
parent
738fb33994
commit
0ad4daa54e
1 changed files with 1 additions and 1 deletions
|
|
@ -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] */
|
||||
|
|
|
|||
Loading…
Reference in a new issue