aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpp <none@none>2010-05-02 00:16:05 +0200
committerSpp <none@none>2010-05-02 00:16:05 +0200
commita0e1357e2b35544e636443cedc3ae2d933df1454 (patch)
tree3ffcf652b9ea83bb1b8e8c35dcbd4dc9b5b96c2b /src
parentd3a842ee373f1b0222fe986bf39ee90112e10609 (diff)
Fix locale selection at server load.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/World.cpp2
-rw-r--r--src/shared/Common.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp
index 6b141057b86..b06f02e90b5 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -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
{
diff --git a/src/shared/Common.h b/src/shared/Common.h
index be61019cef0..4a6aac43390 100644
--- a/src/shared/Common.h
+++ b/src/shared/Common.h
@@ -193,7 +193,7 @@ enum LocaleConstant
LOCALE_ruRU = 8
};
-#define MAX_LOCALE 9
+const uint8 MAX_LOCALE = 9;
extern char const* localeNames[MAX_LOCALE];