ed: fix commit 2ccc1e8

The patch was wrong because the prototype of
strcpy is different to the prototype of strlcpy
This commit is contained in:
Roberto E. Vargas Caballero 2017-01-10 11:28:58 +01:00
parent b95c8ed79e
commit 9ab1478f1e

3
ed.c
View File

@ -611,8 +611,7 @@ dowrite(const char *fname, int trunc)
curln = line2; curln = line2;
if (fclose(fp)) if (fclose(fp))
error("input/output error"); error("input/output error");
if (strcpy(savfname, fname, sizeof(savfname)) >= sizeof(savfname)) strcpy(savfname, fname);
error("file name too long");
modflag = 0; modflag = 0;
curln = line; curln = line;
} }