← Commit list

b08e3e8c2

Glenn L McGrath
Glenn L McGrath
2003-03-28
FAILED Duration: 93s

Subject

fix q command

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+5 -2
@@ -848,8 +848,11 @@ static void process_file(FILE *file)
}
break;
case 'q': /* Branch to end of script and quit */
- free(line);
- return;
+ deleted = 1;
+ /* Exit the outer while loop */
+ free(next_line);
+ next_line = NULL;
+ break;
case 'n': /* Read next line from input */
free(line);
line = next_line;