Fix locale selection at server load.

--HG--
branch : trunk
This commit is contained in:
Spp
2010-05-02 00:16:05 +02:00
parent d3a842ee37
commit a0e1357e2b
2 changed files with 2 additions and 2 deletions

View File

@@ -1724,7 +1724,7 @@ void World::DetectDBCLang()
std::string availableLocalsStr;
uint8 default_locale = MAX_LOCALE;
for (uint8 i = default_locale-1; i >= 0; --i)
for (uint8 i = default_locale-1; i < MAX_LOCALE; --i) // -1 will be 255 due to uint8
{
if (strlen(race->name[i]) > 0) // check by race names
{

View File

@@ -193,7 +193,7 @@ enum LocaleConstant
LOCALE_ruRU = 8
};
#define MAX_LOCALE 9
const uint8 MAX_LOCALE = 9;
extern char const* localeNames[MAX_LOCALE];