- 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
|
@ -34,7 +34,7 @@ void QDECL Com_Error( int level, const char *error, ... ) {
|
|||
char text[1024];
|
||||
|
||||
va_start (argptr, error);
|
||||
vsprintf (text, error, argptr);
|
||||
Q_vsnprintf (text, sizeof(text), error, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
trap_Error( va("%s", text) );
|
||||
|
@ -45,7 +45,7 @@ void QDECL Com_Printf( const char *msg, ... ) {
|
|||
char text[1024];
|
||||
|
||||
va_start (argptr, msg);
|
||||
vsprintf (text, msg, argptr);
|
||||
Q_vsnprintf (text, sizeof(text), msg, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
trap_Print( va("%s", text) );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue