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.
|
// 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.
|
// Strings from database are not null terminated.
|
||||||
memcpy(buffer, result.utf8_string, maxLength);
|
memcpy(buffer, result.utf8_string, maxLength);
|
||||||
|
@ -241,10 +241,10 @@ const char *getLang(int playerIndex)
|
||||||
static cvar_t *amxmodx_cl_langs = NULL;
|
static cvar_t *amxmodx_cl_langs = NULL;
|
||||||
|
|
||||||
if (!amxmodx_language)
|
if (!amxmodx_language)
|
||||||
amxmodx_language = CVAR_GET_POINTER("amx_language");
|
amxmodx_language = CVAR_GET_POINTER("amx_language");
|
||||||
|
|
||||||
if (!amxmodx_cl_langs)
|
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)
|
if (playerIndex >= 0 && amxmodx_cl_langs && amxmodx_language)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user