fixed bug in sed

This commit is contained in:
aiju 2011-07-13 14:38:49 +02:00
parent db0f050d2b
commit f4617dc7db

View file

@ -688,9 +688,11 @@ newfile(enum PTYPE type, char *name)
{
if (type == P_ARG)
prog.curr = name;
else if ((prog.bp = Bopen(name, OREAD)) == 0)
quit("Cannot open pattern-file: %s\n", name);
Blethal(prog.bp, nil);
else {
if ((prog.bp = Bopen(name, OREAD)) == 0)
quit("Cannot open pattern-file: %s\n", name);
Blethal(prog.bp, nil);
}
prog.type = type;
}