diff --git a/amxmodx/CLang.cpp b/amxmodx/CLang.cpp index f93695bc..6cb4e5cb 100755 --- a/amxmodx/CLang.cpp +++ b/amxmodx/CLang.cpp @@ -891,8 +891,10 @@ int CLangMngr::MergeDefinitionFile(const char *file) if (pos > String::npos) { tmpEntry = new sKeyDef; - String key = buf.substr(0, pos); - String def = buf.substr(pos+1); + String key; + key.assign(buf.substr(0, pos).c_str()); + String def; + def.assign(buf.substr(pos+1).c_str()); key.trim(); key.toLower(); int iKey = GetKeyEntry(key); @@ -909,7 +911,8 @@ int CLangMngr::MergeDefinitionFile(const char *file) if (pos > String::npos) { tmpEntry = new sKeyDef; - String key = buf.substr(0, pos); + String key; + key.assign(buf.substr(0, pos).c_str());; key.trim(); key.toLower(); int iKey = GetKeyEntry(key); diff --git a/amxmodx/CString.h b/amxmodx/CString.h index 9b14deef..0224646a 100755 --- a/amxmodx/CString.h +++ b/amxmodx/CString.h @@ -359,7 +359,7 @@ public: int at(int a) { - if (at < 0 || at >= (int)cSize) + if (a < 0 || a >= (int)cSize) return -1; return v[a]; diff --git a/amxmodx/amx.cpp b/amxmodx/amx.cpp index 5e5e3b51..d477e6bb 100755 --- a/amxmodx/amx.cpp +++ b/amxmodx/amx.cpp @@ -51,7 +51,7 @@ #include #endif #endif -#if defined __LCC__ +#if defined __LCC__ || defined __linux__ #include /* for wcslen() */ #endif