From e89cb59891224debfd22ed86f492442d81181132 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 3 Nov 2010 02:15:39 +0100 Subject: [PATCH] fixed problem with CLocConstString when changing to English and back to the previous language again --- src/game/localization.cpp | 3 ++- src/game/localization.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/localization.cpp b/src/game/localization.cpp index 82de858f5..536a4fce9 100644 --- a/src/game/localization.cpp +++ b/src/game/localization.cpp @@ -30,6 +30,7 @@ void CLocConstString::Reload() CLocalizationDatabase::CLocalizationDatabase() { + m_VersionCounter = 0; m_CurrentVersion = 0; } @@ -89,7 +90,7 @@ bool CLocalizationDatabase::Load(const char *pFilename, IStorage *pStorage, ICon AddString(pLine, pReplacement); } - m_CurrentVersion++; + m_CurrentVersion = ++m_VersionCounter; return true; } diff --git a/src/game/localization.h b/src/game/localization.h index 9a2016c8b..c84075e29 100644 --- a/src/game/localization.h +++ b/src/game/localization.h @@ -19,6 +19,7 @@ class CLocalizationDatabase }; sorted_array m_Strings; + int m_VersionCounter; int m_CurrentVersion; public: