diff --git a/amxmodx/meta_api.cpp b/amxmodx/meta_api.cpp index 8ff50871..137c40a2 100755 --- a/amxmodx/meta_api.cpp +++ b/amxmodx/meta_api.cpp @@ -867,7 +867,7 @@ DETOUR_DECL_STATIC3_VAR(SV_DropClient, void, client_t*, cl, qboolean, crash, con va_list ap; va_start(ap, format); - ke::SafeVsnprintf(buffer, sizeof(buffer) - 1, format, ap); + ke::SafeVsprintf(buffer, sizeof(buffer) - 1, format, ap); va_end(ap); CPlayer *pPlayer; diff --git a/amxmodx/util.cpp b/amxmodx/util.cpp index 487b49af..2973b8a5 100755 --- a/amxmodx/util.cpp +++ b/amxmodx/util.cpp @@ -20,7 +20,7 @@ char *UTIL_VarArgs(const char *fmt, ...) static char string[4096]; va_start(ap, fmt); - _vsnprintf(string, sizeof(string)-1, fmt, ap); + ke::SafeVsprintf(string, sizeof(string), fmt, ap); va_end(ap); return string; @@ -698,18 +698,10 @@ size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...) { va_list ap; va_start(ap, fmt); - size_t len = vsnprintf(buffer, maxlength, fmt, ap); + size_t len = ke::SafeVsprintf(buffer, maxlength, fmt, ap); va_end(ap); - if (len >= maxlength) - { - buffer[maxlength - 1] = '\0'; - return (maxlength - 1); - } - else - { - return len; - } + return len; } // From Metamod:Source diff --git a/public/amtl b/public/amtl index 9b1cb728..e86b1b41 160000 --- a/public/amtl +++ b/public/amtl @@ -1 +1 @@ -Subproject commit 9b1cb728c931c0b42a23b96a3c0909470769a72f +Subproject commit e86b1b4159dcc6ff6e4675fd5ea07d1637d11963