ed: fix cmd e/E

Ensure we have a filename before taking further action.
This commit is contained in:
Quentin Rameau 2015-12-15 15:13:21 +01:00 committed by sin
parent d84070398b
commit c5b36e1760

2
ed.c
View File

@ -1191,8 +1191,8 @@ repeat:
goto unexpected; goto unexpected;
if (modflag) if (modflag)
goto modified; goto modified;
setscratch();
strcpy(savfname, getfname()); strcpy(savfname, getfname());
setscratch();
deflines(curln, curln); deflines(curln, curln);
doread(savfname); doread(savfname);
clearundo(); clearundo();