msed: fix parsing of a//

pull/82/head
Leah Neukirchen 6 years ago
parent 3957080127
commit 1207c53444

@ -161,13 +161,15 @@ sed(char *file)
if ((*e == ' ' || *e == ';' || *e == '\n' || !*e)) {
break;
}
sep = *e;
sep = *e++;
if (!sep) {
fprintf(stderr, "msed: unterminated a command\n");
exit(1);
}
while (*e && *e != sep)
e++;
if (*e == sep)
e++;
if (!(*e == ' ' || *e == ';' || *e == '\n' || !*e)) {
fprintf(stderr, "msed: unterminated a command\n");
exit(1);

Loading…
Cancel
Save