mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
More cleanup
This commit is contained in:
parent
5241fdf673
commit
34de3964e6
@ -170,7 +170,7 @@ const char *lookupString(const char *ip, const char **path, int *length)
|
||||
}
|
||||
|
||||
// Let's avoid a crash in case we go over the buffer size.
|
||||
size_t maxLength = ke::Min((size_t)result.data_size, sizeof(buffer)-1);
|
||||
size_t maxLength = ke::Min((size_t)result.data_size, sizeof(buffer) - 1);
|
||||
|
||||
// Strings from database are not null terminated.
|
||||
memcpy(buffer, result.utf8_string, maxLength);
|
||||
@ -241,10 +241,10 @@ const char *getLang(int playerIndex)
|
||||
static cvar_t *amxmodx_cl_langs = NULL;
|
||||
|
||||
if (!amxmodx_language)
|
||||
amxmodx_language = CVAR_GET_POINTER("amx_language");
|
||||
amxmodx_language = CVAR_GET_POINTER("amx_language");
|
||||
|
||||
if (!amxmodx_cl_langs)
|
||||
amxmodx_cl_langs = CVAR_GET_POINTER("amx_client_languages");
|
||||
amxmodx_cl_langs = CVAR_GET_POINTER("amx_client_languages");
|
||||
|
||||
if (playerIndex >= 0 && amxmodx_cl_langs && amxmodx_language)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user