diff options
author | rubidium <rubidium@openttd.org> | 2009-12-31 00:09:29 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-12-31 00:09:29 +0000 |
commit | 768bfa969d0b68c53f8ef7b8ef8855bc819a555e (patch) | |
tree | 1df04c80e08a30860b971777db43df69768ca8a6 /src | |
parent | 75c46b7a277a7c6e3fe559f88db1f7c7ff5885b9 (diff) | |
download | openttd-768bfa969d0b68c53f8ef7b8ef8855bc819a555e.tar.xz |
(svn r18672) -Codechange: mention the game date in the crash log
Diffstat (limited to 'src')
-rw-r--r-- | src/crashlog.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/crashlog.cpp b/src/crashlog.cpp index c8f355115..056e8f00b 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -12,6 +12,7 @@ #include "stdafx.h" #include "crashlog.h" #include "gamelog.h" +#include "date_func.h" #include "map_func.h" #include "rev.h" #include "strings_func.h" @@ -205,7 +206,11 @@ char *CrashLog::FillCrashLog(char *buffer, const char *last) const { time_t cur_time = time(NULL); buffer += seprintf(buffer, last, "*** OpenTTD Crash Report ***\n\n"); - buffer += seprintf(buffer, last, "Crash at: %s\n", asctime(gmtime(&cur_time))); + buffer += seprintf(buffer, last, "Crash at: %s", asctime(gmtime(&cur_time))); + + YearMonthDay ymd; + ConvertDateToYMD(_date, &ymd); + buffer += seprintf(buffer, last, "In game date: %i-%02i-%02i (%i)\n\n", ymd.year, ymd.month + 1, ymd.day, _date_fract); buffer = this->LogError(buffer, last, CrashLog::message); buffer = this->LogOpenTTDVersion(buffer, last); |