missed one unchecked call to ftruncate()

This commit is contained in:
Axel Kohlmeyer
2019-10-19 16:36:13 -04:00
parent fd9da6f934
commit 118c2e5be3

View File

@ -910,7 +910,8 @@ void FixAveTime::invoke_vector(bigint ntimestep)
fflush(fp);
if (overwrite) {
long fileend = ftell(fp);
if (fileend > 0) ftruncate(fileno(fp),fileend);
if ((fileend > 0) && (ftruncate(fileno(fp),fileend)))
perror("Error while tuncating output");
}
}
}