rnd-20140827-1-src
[rocksndiamonds.git] / src / libgame / misc.c
index 5fdbe85b42b800d323ace39fd28c5ef1b28d3bcf..39a55435f9720611e17fa1b04218f7e4bee349ab 100644 (file)
@@ -3691,6 +3691,9 @@ void openErrorFile()
     Error(ERR_WARN, "cannot open file '%s' for writing: %s",
          program.error_filename, strerror(errno));
   }
+
+  /* error output should be unbuffered so it is not truncated in a crash */
+  setbuf(program.error_file, NULL);
 }
 
 void closeErrorFile()