← Commit list

241038661

Glenn L McGrath
Glenn L McGrath
2003-04-09
FAILED Duration: 89s

Subject

fix substitution when replacing with &, we shouldnt check for an escape charcter. Its already been taken care of _somewhere_ else

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/sed.c+1 -2
@@ -722,9 +722,8 @@ static void print_subst_w_backrefs(const char *line, const char *replace,
* fortunately, regmatch[0] contains the indicies to the whole matched
* expression (kinda seems like it was designed for just such a
* purpose...) */
- else if (replace[i] == '&' && replace[i - 1] != '\\') {
+ else if (replace[i] == '&') {
int j;
-
for (j = regmatch[0].rm_so; j < regmatch[0].rm_eo; j++)
pipeputc(line[j]);
}