From c9b6391ab0f8315a2456680d7c4820546a7b6bdd Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 22 Dec 2011 20:05:52 +0000 Subject: [PATCH] (svn r23660) -Feature-ish: add the game script to the crash log --- src/crashlog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/crashlog.cpp b/src/crashlog.cpp index c5719ad47d..8948fec1d5 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -28,6 +28,8 @@ #include "language.h" #include "ai/ai_info.hpp" +#include "game/game.hpp" +#include "game/game_info.hpp" #include "company_base.h" #include "company_func.h" @@ -154,6 +156,10 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const buffer += seprintf(buffer, last, " %2i: %s (v%d)\n", (int)c->index, c->ai_info->GetName(), c->ai_info->GetVersion()); } } + + if (Game::GetInfo() != NULL) { + buffer += seprintf(buffer, last, " GS: %s (v%d)\n", Game::GetInfo()->GetName(), Game::GetInfo()->GetVersion()); + } buffer += seprintf(buffer, last, "\n"); return buffer;