aboutsummaryrefslogtreecommitdiffstats
path: root/code/botlib
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-03-25 21:36:09 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-03-25 21:36:09 +0000
commitdac8a746a7f80b50834e750927335d8d1a00c1c1 (patch)
tree461e51086bf9daff9b03fdf6caf4513f19bff772 /code/botlib
parent37e48fb6ad3a6081c6bf226021b2aa30ad09673c (diff)
downloadioquake3-aero-dac8a746a7f80b50834e750927335d8d1a00c1c1.tar.gz
ioquake3-aero-dac8a746a7f80b50834e750927335d8d1a00c1c1.zip
- 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. git-svn-id: svn://svn.icculus.org/quake3/trunk@1277 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/botlib')
-rw-r--r--code/botlib/be_aas_main.c2
-rw-r--r--code/botlib/l_precomp.c4
-rw-r--r--code/botlib/l_script.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/code/botlib/be_aas_main.c b/code/botlib/be_aas_main.c
index 2963ecd..0296b1a 100644
--- a/code/botlib/be_aas_main.c
+++ b/code/botlib/be_aas_main.c
@@ -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
diff --git a/code/botlib/l_precomp.c b/code/botlib/l_precomp.c
index a84ca2c..06e7877 100644
--- a/code/botlib/l_precomp.c
+++ b/code/botlib/l_precomp.c
@@ -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);
diff --git a/code/botlib/l_script.c b/code/botlib/l_script.c
index 333e1ec..3e43fda 100644
--- a/code/botlib/l_script.c
+++ b/code/botlib/l_script.c
@@ -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);