missed one unchecked call to ftruncate()
This commit is contained in:
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user