]> Shamusworld >> Repos - stargem2/blobdiff - src/log.cpp
Finally fixed problems with demo mode.
[stargem2] / src / log.cpp
old mode 100755 (executable)
new mode 100644 (file)
index b5fcf4d..67a1dea
@@ -1,19 +1,20 @@
 //
 // Log handler
 //
-// by James L. Hammons
+// by James Hammons
+// (C) 2022 Underground Software
 //
 
 #include "log.h"
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "types.h"
+#include <stdint.h>
 
 #define MAX_LOG_SIZE           10000000                                // Maximum size of log file (10 MB)
 
 static FILE * log_stream = NULL;
-static uint32 logSize = 0;
+static uint32_t logSize = 0;
 
 bool InitLog(const char * path)
 {
@@ -49,8 +50,8 @@ void WriteLog(const char * text, ...)
        {
                fflush(log_stream);
                fclose(log_stream);
-               exit(1);
-       }//*/
+               log_stream = NULL;
+       }
 
        va_end(arg);
        fflush(log_stream);                                     // Make sure that text is written!