From c85d4994cf98e5138dc366761fd28632ed308b8e Mon Sep 17 00:00:00 2001 From: Eric Wald Date: Fri, 14 Nov 2014 17:35:06 -0700 Subject: [PATCH] Preventing blank history files --- library/include/Console.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/include/Console.h b/library/include/Console.h index 2f2f68cfa..ce3c90884 100644 --- a/library/include/Console.h +++ b/library/include/Console.h @@ -64,6 +64,8 @@ namespace DFHack } bool save (const char * filename) { + if (!history.size()) + return true; std::ofstream outfile (filename); //fprintf(stderr,"Save: Initialized stream\n"); if(outfile.bad())