- Replace vsprintf function in bg_lib.c with vsnprintf implementation started by Patrick Powell.
- Remove all calls to vsprintf in the engine and gamecode and replace them with calls to vsnprintf.
This commit is contained in:
parent
5728fc2ec8
commit
bb47026b5f
19 changed files with 813 additions and 309 deletions
|
@ -60,7 +60,7 @@ void QDECL AAS_Error(char *fmt, ...)
|
|||
va_list arglist;
|
||||
|
||||
va_start(arglist, fmt);
|
||||
vsprintf(str, fmt, arglist);
|
||||
Q_vsnprintf(str, sizeof(str), fmt, arglist);
|
||||
va_end(arglist);
|
||||
botimport.Print(PRT_FATAL, "%s", str);
|
||||
} //end of the function AAS_Error
|
||||
|
|
|
@ -131,7 +131,7 @@ void QDECL SourceError(source_t *source, char *str, ...)
|
|||
va_list ap;
|
||||
|
||||
va_start(ap, str);
|
||||
vsprintf(text, str, ap);
|
||||
Q_vsnprintf(text, sizeof(text), str, ap);
|
||||
va_end(ap);
|
||||
#ifdef BOTLIB
|
||||
botimport.Print(PRT_ERROR, "file %s, line %d: %s\n", source->scriptstack->filename, source->scriptstack->line, text);
|
||||
|
@ -155,7 +155,7 @@ void QDECL SourceWarning(source_t *source, char *str, ...)
|
|||
va_list ap;
|
||||
|
||||
va_start(ap, str);
|
||||
vsprintf(text, str, ap);
|
||||
Q_vsnprintf(text, sizeof(text), str, ap);
|
||||
va_end(ap);
|
||||
#ifdef BOTLIB
|
||||
botimport.Print(PRT_WARNING, "file %s, line %d: %s\n", source->scriptstack->filename, source->scriptstack->line, text);
|
||||
|
|
|
@ -236,7 +236,7 @@ void QDECL ScriptError(script_t *script, char *str, ...)
|
|||
if (script->flags & SCFL_NOERRORS) return;
|
||||
|
||||
va_start(ap, str);
|
||||
vsprintf(text, str, ap);
|
||||
Q_vsnprintf(text, sizeof(text), str, ap);
|
||||
va_end(ap);
|
||||
#ifdef BOTLIB
|
||||
botimport.Print(PRT_ERROR, "file %s, line %d: %s\n", script->filename, script->line, text);
|
||||
|
@ -262,7 +262,7 @@ void QDECL ScriptWarning(script_t *script, char *str, ...)
|
|||
if (script->flags & SCFL_NOWARNINGS) return;
|
||||
|
||||
va_start(ap, str);
|
||||
vsprintf(text, str, ap);
|
||||
Q_vsnprintf(text, sizeof(text), str, ap);
|
||||
va_end(ap);
|
||||
#ifdef BOTLIB
|
||||
botimport.Print(PRT_WARNING, "file %s, line %d: %s\n", script->filename, script->line, text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue