mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Alpha-3 code space for language names
This commit is contained in:
parent
3efdad36b0
commit
6583767d7e
@ -145,8 +145,8 @@ CLangMngr::CLang::CLang(const char *lang)
|
||||
{
|
||||
m_LookUpTable.clear();
|
||||
m_entries = 0;
|
||||
strncpy(m_LanguageName, lang, 2);
|
||||
m_LanguageName[2] = 0;
|
||||
strncpy(m_LanguageName, lang, LANGNAME_LEN - 1);
|
||||
m_LanguageName[LANGNAME_LEN - 1] = 0;
|
||||
}
|
||||
|
||||
void CLangMngr::CLang::AddEntry(int key, const char *definition)
|
||||
|
@ -20,6 +20,8 @@
|
||||
#define ERR_BADKEY 1 // Lang key not found
|
||||
#define ERR_BADLANG 2 // Invalid lang
|
||||
|
||||
#define LANGNAME_LEN 4
|
||||
|
||||
struct sKeyDef
|
||||
{
|
||||
ke::AutoString* definition;
|
||||
@ -92,7 +94,7 @@ class CLangMngr : public ITextListener_INI
|
||||
typedef THash<int, defentry> LookUpVec;
|
||||
typedef LookUpVec::iterator LookUpVecIter;
|
||||
|
||||
char m_LanguageName[3];
|
||||
char m_LanguageName[LANGNAME_LEN];
|
||||
|
||||
// our lookup table
|
||||
LookUpVec m_LookUpTable;
|
||||
|
Loading…
Reference in New Issue
Block a user