Replace all snprintf with UTIL_Format.

This commit is contained in:
Arkshine
2014-08-07 01:42:58 +02:00
parent d3bc58d80b
commit 69c46aff80
10 changed files with 45 additions and 49 deletions

View File

@@ -691,7 +691,7 @@ char* build_pathname(const char *fmt, ...)
{
static char string[256];
int b;
int a = b = snprintf(string, 255, "%s%c", g_mod_name.c_str(), PATH_SEP_CHAR);
int a = b = UTIL_Format(string, 255, "%s%c", g_mod_name.c_str(), PATH_SEP_CHAR);
va_list argptr;
va_start(argptr, fmt);
@@ -715,7 +715,7 @@ char* build_pathname(const char *fmt, ...)
char *build_pathname_r(char *buffer, size_t maxlen, const char *fmt, ...)
{
snprintf(buffer, maxlen, "%s%c", g_mod_name.c_str(), PATH_SEP_CHAR);
UTIL_Format(buffer, maxlen, "%s%c", g_mod_name.c_str(), PATH_SEP_CHAR);
size_t len = strlen(buffer);
char *ptr = buffer + len;