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
1 changed files with 1 additions and 2 deletions

3
ed.c
View File

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