Unverified Commit 118c2e5b authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

missed one unchecked call to ftruncate()

parent fd9da6f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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");
    }
  }
}