(svn r26506) -Codechange: replace most of vsnprintf with vseprintf

This commit is contained in:
rubidium
2014-04-24 19:51:45 +00:00
parent 3232a64598
commit b886c8db8c
14 changed files with 25 additions and 20 deletions

View File

@@ -31,7 +31,7 @@ void CDECL strgen_warning(const char *s, ...)
char buf[1024];
va_list va;
va_start(va, s);
vsnprintf(buf, lengthof(buf), s, va);
vseprintf(buf, lastof(buf), s, va);
va_end(va);
DEBUG(script, 0, "%s:%d: warning: %s", _file, _cur_line, buf);
_warnings++;
@@ -42,7 +42,7 @@ void CDECL strgen_error(const char *s, ...)
char buf[1024];
va_list va;
va_start(va, s);
vsnprintf(buf, lengthof(buf), s, va);
vseprintf(buf, lastof(buf), s, va);
va_end(va);
DEBUG(script, 0, "%s:%d: error: %s", _file, _cur_line, buf);
_errors++;
@@ -53,7 +53,7 @@ void NORETURN CDECL strgen_fatal(const char *s, ...)
char buf[1024];
va_list va;
va_start(va, s);
vsnprintf(buf, lengthof(buf), s, va);
vseprintf(buf, lastof(buf), s, va);
va_end(va);
DEBUG(script, 0, "%s:%d: FATAL: %s", _file, _cur_line, buf);
throw std::exception();